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
Php: Do Arrays Have a Maximum Size
PHP Strtotime +1 Month Behaviour
While ($Row = MySQL_Fetch_Array($Result)) - How Many Loops Are Being Performed
Merge Two Multidimensional Arrays and Reindex All Subarrays
Undefined Index with PHP Sessions
Load Blade Assets with Https in Laravel
PHP 7 Rc3: How to Install Missing MySQL Pdo
PHP - Csrf - How to Make It Works in All Tabs
How to Pass a PHP Variable to Vue Component Instance in Laravel Blade
How to Correct the [Composer\Downloader\Transportexception] Error for Composer
Php: Strtotime Is Returning False for a Future Date
Jquery: Running Ajax Locally Without a Webserver
PHP Re-Order Array of Month Names