In Progress

Send Email with an Attachment via MailGun

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.


See more: mailgun salesforce, send mailgun attachments, send email content attachment, mailgun attachments send string, salesforce mailgun, mailgun attachments, mailgun send attachment, email attachments salesforce, www salesforce, salesforce one, salesforce attachments, salesforce apex api, rich text message, map string, email message salesforce, attachment salesforce, apex net marketing com, apex documentation salesforce, salesforce email marketing, www salesforce com, Salesforce APEX, net and salesforce, mailgun, html salesforce, html email signature

About the Employer:
( 2 reviews ) Witham, United Kingdom

Project ID: #4184281

Awarded to:


I am salesforce certified developer with 2+ years of experience.

£400 GBP in 7 days
(5 Reviews)

5 freelancers are bidding on average £490 for this job


Hello, Please refer your Inbox for my experiences with Salesforce and more details. Thank you.

£500 GBP in 7 days
(14 Reviews)

Hi, I have vast experience in [url removed, login to view] and I can do this in 15 days.I have done a similar kind of project with [url removed, login to view] where attachments were stored in Let me know if you are interested in my proposal More

£400 GBP in 15 days
(0 Reviews)

Hi Please see PMB for more details.

£400 GBP in 6 days
(0 Reviews)

Hi We are interested in your project and read your [url removed, login to view] have completed 150+ big projects in last 5 years. Please check private message board for details.

£750 GBP in 12 days
(0 Reviews)