Sending any test emails fail with
Error sending email to name@mydomain.co.nz SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
trying to update an admin by checking new password email and phpList presents Error sending password change token and no email is received.
My first glance is that I must have my SMTP username or password incorrect, but I’ve troubleshot that by literally copying from config.php and pasting into a gmail login to make sure they provide access. This account has IMAP enabled and ‘Allow access for less secure apps’ is ON.
Apologies for whatever newb mistake I’m making. I’ve done a manual install of phpList v3.6.5 on our own Ubuntu 18.04 LTS server, but aim to serve out lists via smtp.gmail.com. Install and configuration seemed to go without a hitch, Configure > Checklist are all green. The database functions ok and dashboard operates as expected. I’ve updated configure.php with
define('PHPMAILERHOST','smtp.gmail.com');
$phpmailer_smtpuser = 'listserv@mygsuitedomainname.co.nz';
$phpmailer_smtppassword = 'password';
define("PHPMAILERPORT",'587');
define("PHPMAILER_SECURE",'tls');
Although unnecessary here, the server can send php mail fine (e.g. using echo “Hiya Brian” | mail -s “Email test” myname@myotherdomain.ac.nz so I thought all the php mail handling stuff is fine.
Ports UFW 587, 25, and 465 (both ip4 and 6) Allow OUT from Anywhere.
What didn’t I think of here?!