sendgrid-apex icon indicating copy to clipboard operation
sendgrid-apex copied to clipboard

File Attachment like PDF,DOC,JPEG

Open bhaskararora opened this issue 11 years ago • 8 comments

We are using sendgrid API to send email and the only problem we have is attachment. We need to send PDF,DOC,JPEG from salesforce using sendgrid. BUt we are able to send only .txt file. Please help us regarding the encoding of pdf or other format file so that we can send other format using sendgrid via salesforce. We had a chat with sendgrid and they suggested you can help us regading this.

bhaskararora avatar Jul 28 '14 04:07 bhaskararora

+1

bhaskararora avatar Jul 28 '14 04:07 bhaskararora

+1

bhaskararora avatar Jul 28 '14 04:07 bhaskararora

+1 Looks to me like the code here should be using a multipart request to submit binary attachments. see https://sendgrid.com/docs/API_Reference/Web_API/mail.html#-send

Is anyone maintaining this repo at this point? @brandonmwest? @motdotla?

mscholtz avatar Aug 12 '15 22:08 mscholtz

Here is a solution for sending jpeg, pdf or other data formats as attachments from sendgrid: https://github.com/Kaptio/SalesforceToSendgridWithAttachmentsExample

rfjolnisson avatar Feb 03 '16 17:02 rfjolnisson

+1

Denizhen avatar Feb 15 '16 12:02 Denizhen

@rfjolnisson You're the man! Was able to use your code and get multiple attachments, of different filetypes, sent via SendGrid's API.

mattsimonis avatar May 05 '16 00:05 mattsimonis

@rfjolnisson Can you help in sending unique arguments with the mail using Content-Disposition from your code as mentioned here https://sendgrid.com/docs/API_Reference/SMTP_API/unique_arguments.html?

lochan58 avatar Dec 11 '18 11:12 lochan58

Can you help with sending PDF attachments using sendgrid vis javascript?

carol-saldanha avatar Mar 28 '19 05:03 carol-saldanha