8
votes

I am using phpmailer to send mail in Yii1. System which i have developed send thousand of emails daily. Normally it is working fine how ever sometime system fails to send email. After sometime that mail was delivered successfully (if system fails to send email first time then it will try again ). I am getting different types of email error some time. Not sure how to resolved those errors:

  1. Mailer Error:

The following From address failed: [email protected] : MAIL not accepted from server,x.x.x.x SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [MWHPR11CA0017.namprd11.prod.outlook.com]SMTP server error: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [MWHPR11CA0017.namprd11.prod.outlook.com]

  1. The following From address failed:

[email protected] : MAIL not accepted from server

  1. SMTP Error:

Data not accepted.SMTP server error: 2.1.5 Recipient OK

  1. The following From address failed:

[email protected] : MAIL not accepted from server,354,Start mail input; end with < CRLF >.< CRLF >SMTP server error: Start mail input; end with < CRLF >.< CRLF > SMTP server error: Start mail input; end with < CRLF >.< CRLF >

  1. SMTP Error:

The following recipients failed:[email protected]

So above is the different types of errors i have got sometimes. For #5 it seems that recipient was incorrect so that one is fine. But what about the others? How to solve them?

2
Let me know if more information is required. - DS9
Error 1,2 errors occurring because recipient [email protected] doesn't exist, so it was returned to mailerclass by your host following delivery failed as the user doesn't esixt. - Saad Suri
@SaadSuri I have replaced that email. Originally we have another email. - DS9
Try to send them email from your host and see what you'd get - Saad Suri
It was sent successfully. The issue is i am getting that error sometime, not always. - DS9

2 Answers

4
votes

Depending on the MTA (mail transfer agent) installed on the server, ports used and SMPT settings, you may need to create the "from" user account on the server.

If you're using SSL/TLS, make sure the digital certificate(s) exist and has not expired. Also make sure your server's OS and MTA is up to date with the latest security standards -which if not compatible with latest industry standards may cause issues with the handshake/delivery mechanism.

3
votes

you can always debug with command mail on your server. But as @argon already answered, the problem is probably with SMTP server.

I warmly suggest using external email marketing service if you are sending

thousand of emails daily.

Your server reputation will only get worse and will go straight to spam or rejected by SMTP (as in your case).