Created
August 31, 2017 19:27
-
-
Save carstenjacobsen/de46d6d674c79c12c30abb75e3de7b1a to your computer and use it in GitHub Desktop.
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
CloudRail.setAppKey("[Login to see your license key]"); | |
Email service; | |
MailJet mailjet = new MailJet( | |
this, | |
"[Mailjet API Key]", | |
"[Mailjet API Private Key]" | |
); | |
service = mailjet; | |
InputStream inputstream = new FileInputStream("MyFile.pdf"); | |
String mimeType = "application/pdf"; | |
String filename = "MyFile.pdf"; | |
ArrayList<Attachment> attachments = new ArrayList<>(); | |
attachments.add(new Attachment( | |
inputstream, | |
mimeType, | |
filename | |
)); | |
service.sendEmail( | |
"info@cloudrail.com", | |
"CloudRail", | |
new ArrayList<>() {"your_name@gmail.com"}, | |
"CloudRail is awesome", | |
"Hi there,\n\nGo ahead and try it yourself!", | |
"<strong>Go ahead and try it yourself!</strong>", | |
new ArrayList<>() {"your_cc_name@gmail.com"}, | |
new ArrayList<>() {"your_bcc_name@gmail.com"}, | |
attachments | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment