by Matt T.
I'm not a big fan of Moodle notification emails. They are styled and structured in a way that makes them apt to trigger spam filters. In that respect there's not a lot you can do, other than to bolster your email reputation through other means.
I would suggest using a proper transactional email platform, rather than Google's SMTPServer. Ken has mentioned Sendgrid above. I use Amazon Simple Email Service (SES). Mailchimp/Mailgun are other examples.
These providers put in additional 'checks' on who is allowed to send email on their platform, and what they are allowed to send. They promptly disable the accounts of spammers. They enforce daily sending limits. They have feedback mechanisms which detect when people mark messages as spam, and will limit the sender's capabilities accordingly. Therefore, they tend to have a better reputation, especially with the 'top gun' email services such as Gmail/Google Workspace and Outlook.com/Office 365. They are significantly less likely to trigger spam filters than a run-of-the-mill SMTP server.
On top of this, there's a few other things you can do.
1. Setup SPF, DKIM and DMARC records on your domain. If you use one of the transactional email services listed above, they will have guides on how to do this. This will improve sender reputation.
2. Ensure your domain itself is reliable - don't send junk emails from your own domain. Send marketing emails from another domain, or even better, don't send them at all.
3. Make sure Moodle is configured to only send emails from your own domain, and not to purport to send emails on behalf of other email addresses you do not own. Transactional email services will block an attempt to do so.
4. Make sure your Moodle website uses HTTPS, as opposed to HTTP, so that the links in the email go to a HTTPS website.
I would suggest using a proper transactional email platform, rather than Google's SMTPServer. Ken has mentioned Sendgrid above. I use Amazon Simple Email Service (SES). Mailchimp/Mailgun are other examples.
These providers put in additional 'checks' on who is allowed to send email on their platform, and what they are allowed to send. They promptly disable the accounts of spammers. They enforce daily sending limits. They have feedback mechanisms which detect when people mark messages as spam, and will limit the sender's capabilities accordingly. Therefore, they tend to have a better reputation, especially with the 'top gun' email services such as Gmail/Google Workspace and Outlook.com/Office 365. They are significantly less likely to trigger spam filters than a run-of-the-mill SMTP server.
On top of this, there's a few other things you can do.
1. Setup SPF, DKIM and DMARC records on your domain. If you use one of the transactional email services listed above, they will have guides on how to do this. This will improve sender reputation.
2. Ensure your domain itself is reliable - don't send junk emails from your own domain. Send marketing emails from another domain, or even better, don't send them at all.
3. Make sure Moodle is configured to only send emails from your own domain, and not to purport to send emails on behalf of other email addresses you do not own. Transactional email services will block an attempt to do so.
4. Make sure your Moodle website uses HTTPS, as opposed to HTTP, so that the links in the email go to a HTTPS website.