[2017-02-07 12:46:21] (ERROR @ /index.php) An error occurred while trying to email the Admin: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
This question has been answered by BobRay. See the first response.
Send Failed Mailer error info: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Server Debug Information: 2017-02-07 14:19:37 SMTP ERROR: Failed to connect to server: Connection refused (111) 2017-02-07 14:19:37 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Your host may be blacklisted by the host of your SMTP account, or you may not have the required ant-spam elements set up on your host.
It's also possible that your SMTP setting (especially port and tls/ssl). Your host probably has instructions on outgoing SMTP in their knowledge base. If not, you could file a ticket.
When you set use SMTP to NO, MODX uses the PHP mail() function, which is disabled on many hosts.
Your host may be blacklisted by the host of your SMTP account, or you may not have the required ant-spam elements set up on your host.
It's also possible that your SMTP setting (especially port and tls/ssl). Your host probably has instructions on outgoing SMTP in their knowledge base. If not, you could file a ticket.
When you set use SMTP to NO, MODX uses the PHP mail() function, which is disabled on many hosts.
Here's some more info on Gmail's rejection: http://www.ghacks.net/2014/07/21/gmail-starts-block-less-secure-apps-enable-access/.
My take on it is that allowing 'less secure apps' is fine, though there's no guarantee that it will continue to be available as an option.
After wrestling with Gmail for a while, I finally switched to Mandrill. When that was no longer free, I went to Mailgun. There's example code for Mailgun in the files of the Notify extra (the MailgunX class). I get much better deliverability with MailGun, and I no longer have to worry about what Gmail will do next. The developers at Mailgun do the worrying for me. You can send up to 10,000 emails per month for free. You do have to jump through some hoops to set up the Mailgun account, but you only have to do it once and it's fairly well-documented.
FYI, if you want make sure the emails don't end up in the spam bin, be sure to send the proper DKIM and/or SPF records.
