-
I am using phpmailer to send email via SMTP. Now, i have to restart the server every 3 days in order for the longer email to be able to send out. Please let me know if more information is needed to check what is the issue. Code to reproduce
Debug outputError case:----AFTER CONNECTION OK---- 2022-01-06 02:01:17 SMTP INBOUND: "250 2.1.5 Recipient OK" ----SENDING VERY LONG EMAIL CONTENT OVER HERE----- 2022-01-06 02:01:17 CLIENT -> SERVER: string(72) "SMTP Error: data not accepted.SMTP server error: DATA END command failed" Success CaseWhen sending out shorter messages it will be successful. Successful sending looks like below: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The post-DATA delay is entirely down to the server; the timeout from the RFC on that is 10 minutes. This point is often where a receiving server will perform SPF and DKIM checks, virus scanning, etc, so it's often slow. If the server drops the connection or returns an invalid response (as in the empty response you can see in your transcript), then there's nothing PHPMailer can do except report it as an error, as it's doing. |
Beta Was this translation helpful? Give feedback.
-
Hi Synchro, thanks a lot for your helps and advice. I have finally able to resolved the issue. I have put in the details of my tracing and resolving steps as reference in case anyone else that is encountering the same issue. Thanks again for all your helps and finally i am having a sounds sleep now. |
Beta Was this translation helpful? Give feedback.
Hi Synchro, thanks a lot for your helps and advice. I have finally able to resolved the issue.
I am using wireshark to trace the network flow between my application server and the SMTP server and found out that it is because of the IP-Sec encryption between the 2 server that is causing the issue. By limiting the MTU to 1400, now all email able to send out successfully. There is nothing wrong with the phpmailer package. Thanks again for all your helps.
I have put in the details of my tracing and resolving steps as reference in case anyone else that is encountering the same issue.
https://tech--about.blogspot.com/2022/02/smtp-mail-sending-failure-connection.html
Thanks again for all your he…