I also had the same problem sending to an SMTP server on another machine (if the SMTP server is on the same machine, the PHPlist defaults work perfectly). This is the message I got:
Error sending email to firstname.lastname@example.org SMTP Error: The following recipients failed: email@example.com: firstname.lastname@example.org: Sender address rejected: not owned by user email@example.com
My wrong settings were:
$phpmailer_smtpport = ‘587’;
$phpmailer_smtpuser = ‘firstname.lastname@example.org’;
$phpmailer_smtppassword = ‘mysender_password’;
$phpmailer_smtpsecure = ‘tls’;
Here’s what I did to fix it:
In my case, the problem was that
In XXX/phplist/lists/config/config.php, I changed these lines:
$phpmailer_smtpuser = ‘email@example.com’;
$phpmailer_smtppassword = ‘listbounces_password’;
It seems that the SMTP server (Mailcow) wanted the SMTP logged-in user has to be the same as the Return-path in the recipient’s email. On the recipient side, it looks as if the email was sent from firstname.lastname@example.org, and that is also the Reply-to address. So it seems to be working perfectly.
Here’s how I found the error:
In XXX/phplist/lists/config/config.php, change / add this line:
To ensure settings are activated, on the Linux command line, type this:
> sudo nginx -t && sudo systemctl reload nginx && echo "NGINX CONFIG OK."
In PHPlist on your browser, create a campaign, then
-> “Send a campaign”
At the bottom of that screen, use “Send test” to send an email.
If you have an error, it will show “Error sending mail” and/or FAILED. Now scroll all the way to the top. There should be a [too] detailed transcript of what went wrong. From that, try to figure out what went wrong.
I hope this helps someone.