MyBB Community Forums
SMTP Mailserver - Longer waiting time before timeout - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: SMTP Mailserver - Longer waiting time before timeout (/thread-216119.html)



SMTP Mailserver - Longer waiting time before timeout - Towerplease - 2018-02-28

Hey MyBB Community,

i have the problem that my Mailserver is goin to a kind of "Sleep-Mode" when he isn't transmitting any E-Mails for a while. So when i configure SMTP in MyBB and test it with a registration, everything seems fine but an hour later, i get the message "no 220 - Mailserver not ready". I tested this for about 1 month now with different configurations other DNS-Configuration etc. The mailserver is responding quickly, but after a longer time it just needs 2-10 Seconds for the 220 command to be sent by the mailserver. Is it possible to configure in MyBB a longer waiting time for the SMTP-Server to respond? Cant find any configuration in the UI. 

Thank you in advance!


RE: SMTP Mailserver - Longer waiting time before timeout - Euan T - 2018-02-28

The timeout is hard coded to 5 seconds inside the SMTP mail handler and there doesn't seem to be any config as far as I can see to change that. You could try changing the "5" on this line to a bigger value: https://github.com/mybb/mybb/blob/feature/inc/mailhandlers/smtp.php#L73


RE: SMTP Mailserver - Longer waiting time before timeout - Towerplease - 2018-02-28

Hey Euan T,

thank you very much for the reply. Thats exacly what i searched for! I changed the value to 20. Now it should work fine at any time!

Thank you very much!
Case Closed Smile