Forum breadcrumbs – You are here:Asgaros Support ForumSupportSMTP Plugin Conflict
Please or Register to create posts and topics.

SMTP Plugin Conflict

We started having issues with posting. It was taking an unusually long time (around 20 seconds), and sometimes new posts wouldn’t show up.

I disabled all my other plugins and enabled them one by one to see if one of them was causing the problem. I narrowed it down to this one:

https://wordpress.org/plugins/wp-mail-smtp/

I got rid of that one and installed a replacement, but the new one created the same issue.

https://wordpress.org/plugins/post-smtp/

So it seems this is a functionality conflict, not an individual faulty plugin. Do you have any idea what’s going on, and if so, what can I do to fix it? I need to have some variation of an SMTP plugin – otherwise, most of our email notifications are marked as spam.

Thank you.

Hello @heatherlly

This seems to be an issue with the response-time when WordPress tries to send an e-mail. First of all: Asgaros Forum does not use its own implementation for sending mails. The wp_mail function is used which is part of every WordPress installation.

So everytime when a mail is send, the wp_mail function establishes a connection to your mail-server, deliveres the mail to your mail-server, waits for a response and closes the connection again. As you see this is a very complex process and when a lot of mails are send this may take some time.

Because this is a core-function of WordPress I cannot really fix anything. The first thing you can try is to ask your web-hosting-provider if he is aware of any timing-issues when a PHP-application communicates with their mail-server. Another solution could be to find a WordPress extension which manages the transmission of mails over time in some kind of way. So instead of sending mails directly it should put the mails inside some kind of queue and sends X mails every page-request to prevent this kind of lag which happens when multiple mails are send at once. I am sure there are some plugins for this purpose out there.

Heatherlly has reacted to this post.
Heatherlly
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Okay, that makes sense. I’ll look for an alternate solution.

Also, thanks so much for taking the time to explain. This is one of the best plugins I’ve ever used, both in terms of functionality and the support you provide. Keep up the awesome work!

Asgaros has reacted to this post.
Asgaros
Quote from Heatherlly on January 6, 2019, 3:18 pm

We started having issues with posting. It was taking an unusually long time (around 20 seconds), and sometimes new posts wouldn’t show up.

I have watched the lag between submitting a post and it being published grow to tens of seconds. I know I’ve reported it here and had feedback from @Asgaros but I cannot find the discussion – maybe it was on another platform. I thought it might be related to the number of stored posts and comments or changes by the host – tried splitting a forum, deactivating/reactivating various of the 22 plugins including Litespeed Cache, WP-Optimize, WP Mail Logging to no significant effect. Yesterday, I stumbled upon this obscure setting for my email plugin, Easy WP SMTP:

Send emails asynchronously, which will make pages with email requests load faster, but may delay email delivery by a minute or two. Learn More

That word “asynchronously” jumped out at me as I had suspected that the emailing of notifications for a post was being done between clicking the Submit button and seeing the post published. Having enabled this option, the delay has dropped to a second or two. If there is a delay of a minute or so for the email notifications, that’s not an issue.

I don’t recall ever seeing this option before and it is at the bottom of the “Misc” tab in the plugin’s Settings panel, about as far as it can be from the default starting location. Turns out it was added in an update nearly two years ago and, with autoupdate enabled, I didn’t notice it.

Nor do I recall this topic which raised the same issue – perhaps I did not understand it as well as I do now. @asgaros ‘s reply makes sense to me now, if it did not then but I wonder why the Forum plugin would call for notifications to be emailed between Submit and Published instead of after Published. In any case, I think the fix that Easy WP SMTP was to as he suggested: queue the emails and then use action_scheduler to send the queue on the next minute. I had a glimpse of the action_scheduler schedule/log yesterday but, today, I cannot find how I got to it. It was a link on some page in the WP admin screen, not in Tools. I may have to install the plugin to get to it readily.