tree: 914232ee25fc1b875e2bc32bb75a2f46c559bead [path history] [tgz]
  1. cmd/
  2. go/
  3. testdata/
  4. BUILD.bazel
  5. Makefile
  6. README.md
email/README.md

email

The email service consolidates sending emails into a single service.

API

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: <alerts@skia.org>
To: some-list@example.com
Subject: Alert
Content-Type: text/html; charset=UTF-8

<html>
<body>
...
</body>
</html>

Client

The 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:

  • The ‘from’ email address must be supplied.
  • The function no longer returns a message id.