FLARE-forecast / FLARE-containers

Docker containers to run FLARE forecast
0 stars 2 forks source link

Implement send-email Container #43

Open vahid-dan opened 3 years ago

vahid-dan commented 3 years ago

We are in need of a container to send daily emails to a list of recipients including a message and a few file attachments. We should be able to run this container once a day at a specific time on the IBM Cloud.

vahid-dan commented 3 years ago

The YAML file should include the body message, the list of attachments, and the list of recipients. The lists can be of any length. For instance, we may have just one recipient or multiple recipients and we should be able to add or remove to the lists at any time.

The attachments should have a direct URL for the file (such as a URL to a raw GitHub file) or a link to an S3 object.

Sample YAML File:

gmail:
    username: "someone@gmail.com"
    password-hash: "password in plain text here"
    from: "friendly name"
email:
    subject: "email subject here"
    body: "body message here"
    attachments:
      - "https://github.com/FLARE-forecast/SUNP-data/raw/sunp-graphs/sunpMetDataFigures_<date>.pdf
      - "https://github.com/FLARE-forecast/SUNP-data/raw/sunp-graphs/sunpWaterQualityDataFigures_<date>.pdf"
      - s3-object1
      - s3-object2
      - s3-object3
      - github-url3
    recepients:
      - recepient1
      - recepient2
      - recepient3
vahid-dan commented 2 years ago

@Yun-Jung, Now that the basic implementation is in place, we need to enhance it:

vahid-dan commented 2 years ago

@Yun-Jung, If the attachments are not available due to an error, we should add a notification message to the email. It's confusing if the email says the graphs are attached, but there is no attachment.