3

Our corporate email signature, as many others do as well, has our company logo in in. When I add e-mail to Salesforce it adds that as an attachment to the task/email. The source of the e-mail can be inbound from a client or just using the send to salesforce address from Outlook. While this is small if it is one or two e-mails, some of our opportunities will have dozens if not hundreds of e-mails. This results in the attachments list becoming fairly large and having a very low signal to noise ratio.

Is there a way to have the attachments pruned out automatically or removed before being added at all?

I am using Salesforce for Outlook, Email to Salesforce, and Email to Case and all seem to have the same issue.

2
  • How are you adding the signature and logo?
    – Mike Chale
    Aug 9 '13 at 16:44
  • The attachments are either in the e-mail from Outlook that it adds, or in the inbound e-mail from customers. Aug 10 '13 at 21:18
1

Some email clients, unfortunately, will embed your signature's images/icons as attachments in the outgoing emails (MIME format). A proper web email client (e.g. gmail) will automatically host the images for you and then generate HTML markup for the signature that only references the hosted image, for example:

'-- Bill Lumberg <img src="/gmail/images/Initech.jpeg">' 

^^ then, you don't get all those garbage attachments. So, this is dependent on the email client of the sender.

If you're writing an Apex InboundEmailHandler, you can "kind of" detect the presence of these nasty embedded attachments by searching for a "cid:" (read: content id) in the email's HTML body. Unfortunately, last I checked, even the InboundEmailHandler does not provide the information necessary to determine exactly which attachments correspond to each of the embedded cid's (i.e. you can't differentiate between the "real" attachments and the embedded ones). What I ended up doing, in my InboundEmailHandler, was to check for the presence of "cid:" in the HTML body, and if detected then I apply a simple size-threshold filter (configurable) to all attachments matching an MIME image content-type (e.g. remove all things that look like images smaller than 8K).

Unfortunately, I'm not sure if you'll have any good options outside of an InboundEmailHandler -- or better yet, have users either send in emails via gmail or eliminate their gaudy signatures ;)

1
  • Hmmm something to look at. It still doesn't make it easy to remove all of the existing ones. Aug 19 '13 at 19:56
0

Had the same problem. We found names of the most flagrant ones and run a scheduled search and destroy on them.

Could be scheduled/batch apex, but we used informatica to be that much lazier. No code!

0

This app seems to be geared towards fixing this problem https://blog.internetcreations.com/2014/12/how-to-eliminate-email-signature-attachments-in-salesforce/

1
  • 1
    Have you used this app? If so, did it work as described?
    – Jagular
    Jan 2 '15 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.