Support » Plugin: WP Mail SMTP by WPForms » Not more than 5 emails can be sent at a time

  • Resolved thapa.laxman

    (@thapalaxman)


    Hi there,

    I have a scheduler that needs to send email to about 50 people and sometimes a single email id can receive for than once. However the plugin always fails to send email from the 5th one.

    The same code is as follows:

    require __DIR__.'/wp-load.php';
    for($x=0; $x<10;$x++){
        var_dump(wp_mail("randomemailid@gmail.com", "test b: {$x}", "test message {$x}"));
    }

    sample code screenshot
    email outout

    However I do not have the same problem when using the default php mail function. And the hoster also confirmed that it is fine on his side.

    Is there any configuration or setting that I need to enable to solve this problem? Please help.

    Thx
    Laxman

    • This topic was modified 1 year, 8 months ago by thapa.laxman. Reason: removed email id
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    Hi,

    The problem is that the mailer that you are using to send emails (defined in WP Mail SMTP plugin settings) is throttling email sending too fast.
    The easiest solution will be to add sleep(2); (or other amount of seconds, you will need to investigate what will work) inside your foreach. Also check that this email sending loop is a non-blocking (ran in ajax, or better – using WP Cron).

    Hi Slava, I tried the trick by it still did not work for me.

    Plugin Author Slava Abakumov

    (@slaffik)

    (or other amount of seconds, you will need to investigate what will work)

    Also, which mailer are you using? Are emails delivered?

    Hi, I tried using 5 & 10 seconds. But it always fails on 5th email. I am using wp-mail-smtp. Only the first 5 emails are received.

    Plugin Author Slava Abakumov

    (@slaffik)

    which mailer are you using?

    Not the plugin, but Mailer. Check plugin admin area.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not more than 5 emails can be sent at a time’ is closed to new replies.