go-aws-news

Go app + library to fetch what's new from AWS

View the Project on GitHub circa10a/go-aws-news

SMTP Setup

  1. Provide your email server and port settings in the config.yaml under providers.smtp.
  2. Comment out or leave username and password blank if using an unauthenticated smtp server.
  3. Add the from address and 1 or more to addresses.
  4. Optionally override the Email Subject.
  5. Optionaly provide a customTemplate (path to file). See Custom Template for more info.

Example Config

  smtp:
    enabled: true
    server: "smtp.gmail.com"
    port: "587"
    username: "mail@gmail.com"
    password: "abcdefghijklmno"
    subject: "AWS News"
    footer: "Brought to you by <a href='https://github.com/circa10a/go-aws-news'>go-aws-news</a>"
    from: "mail@gmail.com"
    to:
      - "some.email@mail.com"
      - "some.other@mail.com"
    # customTemplate: /path/to/email.html

Default Template

The default email template looks like this:

AWS News default email template

The footer can be customized in the config.yaml providers.smtp.footer. For more customization see custom template.

Custom Template

To provide a custom email html template, start with the defaultTemplate included in the code and build from there:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <style>
    .footer {
      text-align: center;
    }
    .footer p {
      margin-top: 40px;
    }
    </style>
  </head>
  <body>
    <h3>AWS News for :</h3>
    
    <div class="footer">
      <p></p>
    </div>
  </body>
</html>

There are 3 keys available to use:

   
Date The date of yesterday’s news.
News The AWS News in an unordered list of links.
Footer Custom footer (overridable in config.yaml )