The email service consolidates sending emails into a single service.
The client POST's the message in RFC2822 format to
/send on this service running only on an internally exposed port.
The server will parse the
From: line from the sent message and use that to determine which account to use.
I.e. the format of the POST body will look like this:
From: <firstname.lastname@example.org> To: email@example.com Subject: Alert Content-Type: text/html; charset=UTF-8 <html> <body> ... </body> </html>
emailclient.Client is a replacement for
email.Gmail that will only need minor changes to a
SendWithMarkup() call. It is almost a drop-in replacement for
email.Gmail.SendWithMarkup() with the following changes: