Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement