moodle can't communicate with SMTP

moodle can't communicate with SMTP

Anna Naden發表於
Number of replies: 6

Ubuntu 20.04, Apache2, Moodle v4

smtp server: smtp.gmail.com:587

security: TLS

auth type: LOGIN

user=my gmail address

When I test it, it says "cannot communicate" I have tried recommended settings for outlook 365 also, and have verified the password. I have tried the recommendations of the help videos. It just can't communicate. Is there any way to see what the SMTP server's response it?

評比平均分數: -
In reply to Anna Naden

Re: moodle can't communicate with SMTP

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
I deleted your other posts, as they all seemed to be about the same thing. Please don't start a new thread for the same problem.

I recommend making sure your Ubuntu server can actually communicate with the mail server. You can use 'telnet' from the command line. There are plenty of online tutorials.

This is the first one I found - https://knowledge.broadcom.com/external/article/164907/test-smtp-authentication-with-messaging.html

If that doesn't work then it isn't Moodle (it probably isn't)
In reply to Anna Naden

Re: moodle can't communicate with SMTP

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
If you are following https://docs.moodle.org/en/Email_setup_gmail, Google had a change of mind.

> SMTP password: password for the above email account

Should be now "app password", whatever that is. I don't use Google, but this is what a teacher posted in an internal forum:

enable 2-factor authentication in my Gmail/Google account and then generate a custom app password for moodle through the Gmail/Google account and use that password instead of my Gmail password in the moodle outgoing email configuration.

As you going through that process, you might want to contemplate on https://docs.moodle.org/en/Email_setup_gmail#Is_Google_mail_suitable_for_your_requirements?.
評比平均分數:Useful (1)
In reply to Visvanath Ratnaweera

Re: moodle can't communicate with SMTP

Anna Naden發表於
Yes, thanks. That works. I just contacted Google with my $3/month support plan and they walked me through it. There is a setting frm the gmail page and a setting in account.google.com
In reply to Anna Naden

Re: moodle can't communicate with SMTP

Ken Task發表於
Particularly helpful Moodlers的相片

Yes, that might work for notifications from moodle to teachers/students/admin, but if one decides to force subscribe all users of a moodle whose total user base is, oh, let's say 5000 users, Google might not work for that volume of email traffic.

You mentioned settings from the Google end ... mind sharing what they were called and their function? (not your login/pass/URL).

If you plan to use a lot of forums in your Moodle, might be better off using and SMTP service that is designed for volumes of traffic beyond what Google will allow.

One such service is SendGrid ... and their API Key setup.   Moodle can be configured to use SendGrid and the API key setup.

Please see:

https://moodle.org/mod/forum/discuss.php?d=392578#p1662786

Strongly suggest, that now you have Google working, and a test message has been received, look at the full header of that message to learn now the path email takes from your moodle server to whatever inbox.   That might prove to come in handy in the future.

'SoS', Ken (a former email/email gateway/listserv server administrator)

評比平均分數:Useful (1)