[keyserver] Use SMTP (via Postmark) instead of sendmail for email subscriptions
Summary:
The SubscriptionForm on the landing page broke when we moved the keyserver to EC2 because the image didn't include sendmail. After installing sendmail it appeared that things were working and the requests were succeeding, but the emails didn't end up getting delivered reliably. There's additional configuration that's necessary to get the sendmail approach working reliably/consistently.
Instead, in this diff we move from the sendmail transport to using SMTP via nodemailer with Postmark as the "host."
These are some resources I referenced to possibly save reviewer some googling:
- https://postmarkapp.com/developer/user-guide/send-email-with-smtp
- https://www.mailgun.com/blog/email/which-smtp-port-understanding-ports-25-465-587/
- https://sendgrid.com/blog/whats-the-difference-between-ports-465-and-587/
Test Plan:
- Change the to field in sendmail.sendMail to my Comm email account
- Navigate to localhost/commlanding/
- Put a valid email in the SubscriptionForm input
- Click "Subscribe for updates"
- Observe that the email shows up in Postmark
- Ensure that the email showed up in my inbox
Reviewers: def-au1t, palys-swm, yayabosh, ashoat
Reviewed By: ashoat
Subscribers: Adrian
Differential Revision: https://phab.comm.dev/D4291