Completed

Send Email with an Attachment via MailGun

This project was successfully completed by yurybondarau for £400 GBP in 7 days.

Get free quotes for a project like this
Employer working
Completed by:
Skills Required
Project Budget
£250-£750 GBP
Completed In
7 days
Total Bids
5
Project Description

We need to send an Email with Attachment from Salesforce to MailGun (An Email Marketing API) using the Salesforce Platform.

MailGun Website: [url removed, login to view]
MailGun Documentation: [url removed, login to view]

We need the ability to call in to one method to do this, and we need to send our Emails using the following method signature:

public String sendEmail(String pAPIKey, String pEndpointAddress, List pToAddress, String pFromAddress, String pEmailSubject, List pCCAddress, List pBCCAddress, String pHTMLContent, String pTextContent, Map pAttachmentData);

Here is a breakdown of what all the parameters are, most of them are pretty self-explanatory but I will mention them anyway:

String pAPIKey - The API key that we specify to authenticate ourselves with the Server.
String pEndpointAddress - The Endpoint which we will send our POST message to, will always be a Mailgun Endpoint but does change depending upon the Account Name.
List pToAddress - To Addresses of the Email (Who we are sending to)
String pFromAddress - From Address of the Email (Who the email is from)
String pEmailSubject - The Subject of the Email (The Subject which will be displayed when the Email is sent)
List pCCAddress - The Carbon-Copy Addresses of the Email (An additional copy of the email will be sent to these addresses)
List pBCCAddress Address - The Blind-Carbon-Copy Addresses of the Email (An additional hidden copy of the email will be sent to these addresses)
String pHTMLContent - This will be the content of the Email that we want to send, this is so we can send Rich Content Emails.
String pTextContent - This is the text-version of the Email that we want the ability to send.

Finally we have our Attachment Parameter:

Map pAttachmentData - This is where our attachments will be specified, the Key of the Map being the Filename, and the Value being the data.

End result we should be able to send Rich HTML Emails with Attachments through MailGun Specifying who the email is to, who it is from, who is Carbon-Copied in, the subject, the content, and the attachment data.

You will supply full source for the developed Apex Class.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online