Skip to content
Advertisement

phpmailer – The following SMTP Error: Data not accepted

I’m trying to figure out this issue for 6 hours. But there is nothing to make sense. Here is the scenario; There is a well formatted HTML template.

JavaScript

Here is the array of recipients’ mails;

JavaScript

Everything looks fine and email ready to send.Here is the phpmailer config;

JavaScript

Everything is same when I test it. But sometimes email was sent. Sometimes it was not sent. Give me the following error : The following SMTP Error: Data not accepted.

I hope I explained

Advertisement

Answer

your server dosen’t allow different sender and username you should config: $mail->From like $mail->Username

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement