You need to sign in to do that
Don't have an account?

Image tag in an email
Why is salesforce adding an image tag to dynamically generated HTML email? It's causing us issues (Outlook).
Here's very simple code to with HTML generated content:
Messaging.Singleemailmessage mail;
mail = new Messaging.Singleemailmessage();
mail.setSubject('TEST 123');
mail.setHtmlBody( '<html><h1>THIS IS JUST A TEST</h1></html>');
mail.setSaveAsActivity(false);
mail.setTargetObjectId(UserInfo.getUserId());
Messaging.sendEmail(new List<Messaging.Singleemailmessage> {mail});
When i execute this, it adds an image tag right before the closing HTML (</html>).
How to workaround this? Why is this?
Thanks
I believe that's the web beacon. You might be able to turn it off by going to Setup ->Activity -> Activity Settings -> Uncheck Enable Email Tracking.
All Answers
I believe that's the web beacon. You might be able to turn it off by going to Setup ->Activity -> Activity Settings -> Uncheck Enable Email Tracking.
then that disables an org-wide feature that we need :(