I am using Email Services to process emails and email attachments and attach them to the Notes and Attachment section of a custom object. However when I send out an email with .eml or .msg file as an attachment salesforce creates 3 records in the Notes and Attachments. One has the actual email body of the attachment and other 2 files contain some html tags.

Any idea why 3 records are created?

  • Are you able to get the raw email message? I suspect Salesforce is splitting on the boundary and is creating Salesforce attachments based on the Content-Types. Apr 14, 2015 at 1:46
  • The raw email message comes as one attachment record. However there are 2 other records that get created with html tags and they are not very readable. This is very confusing to the users as they are not sure which record contains the email.
    – Jaya
    Apr 14, 2015 at 4:27
  • By the raw email message I mean like what you would see if you use the "show original" option in gmail. You will see the To:, Subject: and Date: headers among many others. This would be close to how Salesforce receives the email (maybe a few different headers) and might provide some indication about how the email (and attachments) are being handled. Apr 14, 2015 at 8:05
  • In one attachment I get only the email body. In the second attachment I get the User-Agent, Date, From, To, CC and a lot of html tags like: --B_3511806346_4294948881 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable <html><head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > </head>
    – Jaya
    Apr 14, 2015 at 10:27
  • I was thinking more of the the top level email that contains all the attachments. Apr 14, 2015 at 20:56

1 Answer 1


Salesforce support confirmed that this is a limitation and they are actively working on fixing this. However they do not have an ETA yet.

  • We have the same issue when emails are sent to sfdc (email to case) & they have another email attached to them. It creates the email, but then turns the attached email into 3 attachments (no file extensions). One looks like plain text, another is rich text, & the other the raw message with all the html tags/msgID info. Actual attachments to either email come across fine, its just attached emails that gets turned into 3 attachments. Did you get a known issue number, so we can report we have the same issue? If you figured out another way around it, any insights would be appreciated. Thanks!
    – Michele
    Jan 5, 2017 at 1:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .