Server response delayed by 30 seconds for SMTP email

Avatar
  • Answered
Whenever we send a SMTP email using localhost & phpmailer, it takes 30 seconds for it to complete. We looked at the debug information and we found that the server is taking 30 seconds to respond at the end of the process as shown below. I am using phpmailer with EXIM mail server in a vps node. Could you help in identifying the issue and removing the 30 seconds delay from the server.

Partial debug result:
------------------------------
2015-11-17 21:49:59 SERVER -> CLIENT: 250 Accepted
2015-11-17 21:49:59 CLIENT -> SERVER: DATA
2015-11-17 21:49:59 SERVER -> CLIENT: 354 Enter message, ending with "." on a line by itself
---
---
---
2015-11-17 21:49:59 CLIENT -> SERVER: .
***SERVER responds below after a 30 seconds delay when CLIENT sends a dot "." ***
2015-11-17 21:50:29 SERVER -> CLIENT: 250 OK id=xxxxxxxx-TC
2015-11-17 21:50:29 CLIENT -> SERVER: QUIT
2015-11-17 21:50:29 SERVER -> CLIENT: 221 my.servername.com closing connection

Avatar
johnpaulb-imhs1
Hello,

Thank you for your contacting us about a delay when sending email via PHPMailer. There shouldn't be any setting on the server delaying the email transmission, but will we will be happy to help troubleshoot further.

Can you provide a link to the script, or form you are using so we can test and recreate the issue?

If you have any further questions, feel free to post them below.

Thank you,
John-Paul