0

I have created an apex class and email service that handles inbound emails and associates them to a record based on a match in the email subject. The idea is to mimic email to case functionality for my custom object and it is working fine except for one thing. The Apex class checks the subject line of the incoming email for a matching record in salesforce. If the receiver of the initial email deletes or alters the unique field in the subject before replying, then the email is not matched.

I would like to be able to either insert the field into the email Header/Footer or make the merge field Invisible so that it is not going to be deleted.

Is it possible to hide a merge field in an email template sent from salesforce?

0

Looking at the Apex reference guide, it doesn't seem possible to add your own headers to outbound email. You could try adding this as an idea to the Salesforce Success community and maybe one day it will be implemented.

An alternative would be to include the merge field in the body of the email and set the font colour to the same as the background, but this is not advised as it relies on the recipient leaving the thread untouched (I know several customers of ours who like to delete everything under their own reply for 'cleanliness').

When I've been in contact with support desks via email before, I have noticed some have a disclaimer at the bottom asking you to leave the subject intact.

| improve this answer | |

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.