I am at my wits end trying to get outgoing email to work on my new (and first) installation of Moodle. Any help would be most appreciated.
Moodle version: 3.9.1+
OS: Ubuntu 18.04
PHP version: 7.2
SSL Certificate; Let's Encrypt installed via certbot, working fine for https
Cloud Service: AWS Lightsail
Firewall: Ports 22,25,53,80,443,465,587 open
Things I have done:
2. To help rule out Workmail as the problem, I tried to use my google email smtp, using settings shown on the moodle install/config webpage. When I try the Test Email Configuration in Moodle, for both Workmail and Google II get same message: "Your site couldn't communicate with your mail server."
What is interesting is that Google DOES perceive some sort of smtp request because I get an security email warning about it. However, when I confirm with Google that I sent it, I still get the same Moodle message of not being able to communicate with the mail server.
Questions for my understanding (because I am quite new to Linux and web apps generally):
1. Does moodle pass the smtp config info on to phpmailer, and phpmailer then is responsible for handling the rest of the smtp request? I have looked at some phpmailer info online and I am having a really hard time understanding it.
2. Could my ssl certificate be working fine for https but NOT for ssl traffic required for a successful smtp authentication and connection? If so, I could use some help on knowing how to determine where the problem might be.
3. Beyond what I have tried, is there anything I may have forgotten to do or check?
I really need this to work because we will need it for email-based self-registration.
Thank you very much