Configuring Drupal 9 to use the SMTP module with iCloud+'s custom domains

When Google announced it was going to shut down its legacy free email for domains, I decided to  use iCloud+ to manage the mail from seanreiser.com since I was paying for it anyway. I set it up but it's been working fine as a mail server. I had been running sendmail off my web server to send mail from my site when I needed to. In order to avoid spam folders,I decided to move to using SMTP, which meant I needed to authenticate to Apple's SMTP Server.

At first, I had a problem authenticating, until I realized that your email addresses at your custom domain is an aliase, so you need to authenticate with your iCloud account and an App-Specific Password. I'm using Drupal 9;s SMTP Authentication Support  Module.  Here are the parameters I used on /admin/config/system/smtp:

SMTP server settings
  • Enable TLS encryption automatically - On
  • Turn on the SMTP keep alive feature - Off
SMTP Authentication
  • App-Specific Password.
E-mail options
  • Allow to send e-mails formatted as HTML - up to your use case

Everything else leave as is. I'd do a test with debugging turned on and then turn it off. I also used the mail system module to redirect all mail to SMTP.

Good luck, Share and  enjoy!

 

 

Image
Laptop w/ Stickers