Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After sending the "\r\n.\r\n" after the mail payload, smtp_send_email was not waiting for the mail server to complete post-processing and respond with "250", but was sending "QUIT\r\n" immediately and dropping the connection. Mail server may kill the transaction if it can't send the "250" (socket closed). The changes proposed completes the mail transaction by reading for the 250 and in smtp_disconnect steps through a proper quit sequence by waiting for the 221 server response. I discovered this by including the --debug option in services.conf sendmailpath, which invoked logging in smtp_send and that slowed it down enough for the mail server to return the 250 and complete the transaction.
- Loading branch information