Phpmailer - the Following Smtp Error: Data Not Accepted

phpmailer - The following SMTP Error: Data not accepted

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

Mailer Error: SMTP Error: data not accepted

It's unusual for a server to allow sending without authentication. I suggest setting the Host, SMTPAuth, Username and Password properties, as the examples provided with PHPMailer show.

PHP Mailer sending an error of data not accepted

The clue is in the name of the exception: SendAsDenied; it's saying you cannot use anything other than your Username as the From address, especially not arbitrary (forged) addresses.

If you want to avoid forgery problems, send from your admin address, but set the user's address as a reply-to. That way you're not forging, and replies will go to the right place.



Related Topics



Leave a reply



Submit