A little deeper iceburg is involved me thinks.
Do you have your Moodle set up to relay mail via SMTP service?
If not, then your moodle is using the built-in phpmailer which can't pass muster on systems bent on protecting 'customers' - and there are more of those than just gmail.com.
A good SMTP relay setup will pass muster with Google checks ... those checks are SPF, DKIM, valid no-reply address, etc. - multiple.
Ask those students to check their spam. Also, if they had previously gotten something from your Moodle, ask them to look at the 'Show Original' of that message. That will show the full header of the email message which shows the mail servers that message ran through to get to their inbox.
The 'Receivied' lines in that header are the important ones.
'SoS', Ken
David
BTW, you have been around here a LONG time. Really appreciate all the help you have given.
Yes, am 'ancient'. :|
When you look around for SMTP services ... first check with where you are hosting. Many offer a setup where by customer has 10,000 free and then X$ amount over.
Dunno what your volume of outgoing mail would be and not sure there is any tool that moodle admin has that would tell you that.
I, personally, use SendGrid's API. But my sites are sandboxes and very little mail come from them.
See:
https://docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api
Do learn the gmail show original thang so you can tell students how 2 ... just in case.
'SoS', Ken