• Creator
    Topic
  • #1237
    Gabriel Thy
    Member

    My problem which has lasted through several updates is that SCS returns an error that mail cannot be sent at this time. I’ve found that rebooting the browser immediately clears the cache so that the plugin works properly, but our site serves nearly a thousand members and users, so the proper operation is mission critical.

    We do not use WordPress SMTP, but successfully use a third party mailer (similar to MailChimp) called Postmark.

    I guess I don’t know how to tweak some cache to force the plugin to send mail. Any pointers?

    http://www.loudouniwla.org

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #1238
    MillaN
    Keymaster

    Hi,

    Plugin is not sending emails on it’s own, so I would not know what to change. All emails are sent through wp_mail function, and handled by WordPress. Message about sending problem is generated based on the result of wp_mail function, and if it returns false, error message is displayed.

    From what I can see, you don’t use cache plugins (like W3 Total Cache, or similar), so the content on page is always OK. Also, sending is not related to browser, it is done from server side. To process it plugin relies on WordPress own ajax handler, and that is usually not cached.

    You need to determine why exactly email sending fails (some sort of logging for wp_mail function), but I don’t see how it can be related to my plugin, since it is not doing anything except calling wp_mail function.

    Regards,
    Milan

    #1239
    Gabriel Thy
    Member

    Yes Milan, I understand what you are saying, but rebooting the browser does indeed work, after five, ten times of persistent failure otherwise. Strange. Happens to me, happens to members many times.

    All other WP mail calls thru Postmark seem to work fine, password changes, new member logins, et cetera. System processes some 30-40 mails per week.

    At least you seem to understand that I have a problem.

    I have no idea what to do….

    #1243
    MillaN
    Keymaster

    Do you use some form of cache that I can’t see directly? One more thing can cause failed emails: plugin embeds protection NONCE field that is submitted through AJAX for verification purposes. But this field value expires after a while, and each time plugin renders for generates new value. But, if some form of cache is used, it can happen that some users see old form with NONCE that is invalid due to cache expiration and when NONCE is not verified, submitting email fails.

    Milan

    #1265
    Gabriel Thy
    Member

    Perhaps the problem is I have a Postmark API, and no place to put it. I had a client telling me today that he has used multiple browsers and still cannot send mail. Whatever it is, I know it has worked periodically,and no, it isn’t busy. One or two messages a day, of that are attempted I’d guess.

    #1266
    Gabriel Thy
    Member

    Yes, I am using a cache plugin. But these are rare mail attempts. The slider doesn’t get very much usage, but is very important to our organization. Remember, it was I who gave you the idea to allow for multiple specific email recipients. I really appreciate you building that in for me, but now I just have to get it working.

    Gabriel Thy
    IT Development Team
    LCCIWLA, Leesburg VA

    #1267
    MillaN
    Keymaster

    If you have cache plugin, that is the problem than, NONCE protection field gets cached with the page, and in some cases when verified it has already expired. And email doesn’t get sent. You can try to disable this protection method and see what happens. Just delete one line. Find file ‘ajax.php’ in plugins ‘code’ directory. Find line 69 that should look like this:

    check_ajax_referer('simple-contact-slider', '_nonce');

    Remove this line. If the sending problems stop after this, I will add new option for plugin to disable this protection method.

    Milan

    #1271
    Gabriel Thy
    Member

    Excellent Milan! That did it. Tried it twice. Worked like a charm.

    One more thing. Is it possible to include the recipient’s name on the email without too much trouble? Everything else is there, but the recipient.

    As network administrator in a chapter membership of over 1500 members, and many different levels of computer and chapter expertise, it helps to keep an eye on operations when necessary, so I keep a log of contact slider usages for reference. Having the recipient posted on the mail would help.

    Thanks for getting it working again. I look forward to any updates.

    Gabriel

    #1272
    MillaN
    Keymaster

    Great to hear it. I will include this as an option with next release. As for the recipient name, that is not possible right now, but I will see if there is something that can be done. I plan major 4.0 version to be released in the next 2-3 months, and I will see about that option too.

    Milan

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘SCS’ is closed to new replies.