bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

How can I remove the php delay when users are emailed

(2 posts)
  • Started 1 year ago by _ck_
  • Latest reply from _ck_
  • This topic is not resolved

Tags:

  1. I've noticed with certain plugins that email users, like favorites notification and others, that PHP will sit and wait until it gets a response back from the mail function.

    Is there any kind of drop in replacement for mail() that will just queue the email and come back to php and load the rest of the page asap?

    Posted 1 year ago #
  2. I think I found the answer to my question with a bit of sendmail/exim research.

    Apparently adding "-odq" to the end of the mail() options will force it to queue only, which means instant response back to the user. However that delays mail of course until the next exim run. "-odb" is supposed to be the default, running the delivery in the background and not while mail() waits, but I seem to get the best of both worlds, instant delivery and no wait on mail() when I force it, so forced it is.

    Recommended for other plugins that use mail:
    mail($to,$subject,$message,$headers,"-odb");

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.