Support » Plugin: PTA Volunteer Sign Up Sheets » Error Sending Email

  • Resolved lwsneal

    (@lwsneal)



    Hi looking for any insight into an issue we’re receiving, it’s an error from the PTA Sign-Up Sheets application saying that the email couldn’t be sent when a user tries to sign up for a shift using the Sign-up Form Sheet.

    However: It works successfully when the Calendar is configured to show the sign-up form in a pop-up dialog vs. with the sheet.

    Ty,
    Neal

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    Please read this first:
    https://stephensherrardplugins.com/support/topic/error-sending-email/

    It has happened often enough, that I made that a sticky post on my site where I could refer people to.

    I need to look at my calendar code to see if it even checks if the WordPress wp_mail function returns true or false. It may simply be that I didn’t put any email error check in that extension.

    Sounds good, if it matters I’m using Mailgun’s plugin and service to send all mails. The calendar plugin does seem to be doing something a tad different, they are working anyway.

    Will continue to research.

    Neal

    Plugin Author DBAR Productions

    (@dbar-productions)

    I checked the calendar code, and it will also show an error message also if the wp_mail function returns false… so, nothing different there. In fact, the calendar plugin uses the email class from the core plugin to send the mail (formats and then sends through wp_mail), so the way the emails are sent are exactly the same whether or not you use the calendar plugin. The only difference is that on the calendar plugin the info is sent back to the server via Ajax, and the server side code that handles that ajax requests instantiates a new pta_sus_emails class object and sends the email, and then returns the results via json to the calendar’s javascript code. So, the only difference is where that error is processed and displayed… in the main plugin the error is processed after the form has been submitted via POST method, with PHP processing. Whereas in the calendar, the email is processed in the background through the ajax call, still via PHP, but then the results are formatted and set back to the javascript via json, so they are displayed differently.

    So, I have no idea why it would work one way for you and not another since the email is being sent exactly the same way (with the same functions). The only difference is how the results are displayed, and how WordPress is loaded (normal verses AJAX). You only see that error message if the WordPress wp_mail function returns a false result. That doesn’t necessarily mean the email wasn’t sent. Also, if you are using another plugin to send emails, then that plugin takes over the wp_mail function and replaces it with its own functions. So, you would have to ask the developer of that plugin if it returns different results based on if the send email request was done via an Ajax call or normal PHP load of WordPress.

    Have you tested some signups through both methods with an email you own and can check to see if the emails are in fact being sent (even if you get an error message)?

    One thing I did just verify, no email is sent when do the signup, but when I go back to calendar and click the X beside my name to remove me and the ajax window pops up with Signup Cleared message, the email shows up in my Mailgun’s logs and I do get it.

    Plugin Author DBAR Productions

    (@dbar-productions)

    Do you have a Global CC address set in the settings? And/Or multiple chair emails?

    If your emails are being sent to multiple CC/BCC addresses, I found that the formatting of the BCC addresses seems to cause problems on some servers (or with some mailer plugins). Even though I format them the way suggested in the WordPress codex for the wp_mail function, some servers simply don’t like that.

    Try enabling the option near the bottom of the email settings page that says:
    “Separate CC/BCC to individual TO emails?”

    That will force my plugin’s mail function to send out a separate email to each address, instead of one email with several BCC addresses. That will fix email issues on some servers, and shouldn’t be an issue unless your hosting company limits how many emails can be sent in a certain time span (and you get a lot of signups).

    Plugin Author DBAR Productions

    (@dbar-productions)

    Marking this as resolved for now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error Sending Email’ is closed to new replies.