Created
May 6, 2017 09:46
-
-
Save stevedomin/96d7d0870abb44822cfc85ec5d6fc47c to your computer and use it in GitHub Desktop.
plug_attachment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Swoosh.Email | |
upload_invoice = %Plug.Upload{ | |
path: "/tmp/plug/DEFfF014AaA01F", | |
content_type: "", | |
filename: "invoice-peter-may.pdf" | |
} | |
new() | |
|> to("[email protected]") | |
|> from({"Jarvis", "[email protected]"}) | |
|> subject("Invoice May") | |
|> text_body("Here is the invoice for your superhero services in May.") | |
|> attachment(uploaded_invoice) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment