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 recipient@hisdomain.com SMTP Error: The following recipients failed: recipient@hisdomain.com: listbounces@mydomain.com: Sender address rejected: not owned by user mysender@mydomain.com
My wrong settings were:
define(‘TEST’,0);
define(‘PHPMAILERHOST’, ‘mail.mydomain.com’);
define(‘PHPMAILERPORT’,‘587’);
$phpmailer_smtpport = ‘587’;
$phpmailer_smtpuser = ‘mysender@mydomain.com’;
$phpmailer_smtppassword = ‘mysender_password’;
$phpmailer_smtpsecure = ‘tls’;
define(‘PHPMAILER_SECURE’,‘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 = ‘listbounces@mydomain.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 mysender@mydomain.com, 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:
define(‘PHPMAILER_SMTP_DEBUG’,5);
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.