Send an email using the SendGrid API.
Possible error codes we might get back when trying to send an email. Some are just normal HTTP errors, others are specific to the SendGrid API.
In order to send email via SendGrid, you need an API key. To do this signup for a SendGrid account.
Then after you've logged in, click on the settings tab, then API Keys, and finally "Create API Key".
You'll get to choose if the API key has Full Access, Restricted Access, or Billing Access.
For this package it's best if you select restricted access and then set Mail Send to Full Access and leave everything else as No Access.
Once you've done this you'll be given an API key. Store it in a password manager or something for safe keeping. You are highly recommended to not hard code the API key into your source code!
A SendGrid API key. In order to use the SendGrid API you must have one of these.
The body of our email. This can either be plain text or html.
Create a text body for an email.
Create an html body for an email.
Note that this function expects Html.String.Html as a parameter.
To create those you'll need to run elm install zwilias/elm-html-string.