2

We Want to send Additional Information such as Contact name, phone number etc through the email headers. Is it possible to do so and How?

Since it's only name value pair is there any mechanism through which we may achieve it.

4

If you're specifically sending the emails to salesforce, you can use custom headers (headers that start with "X-"), and they will be available in the InboundEmail's header array. RFC 822 states that all headers starting with X- are considered safe for custom use, so they should appear correctly in the inbound email.

You'll need to write or configure an email sender (MTA) that is capable of sending custom headers. The raw message would look like:

From: <some-user@domain.tld>
To: <salesforce-endpoint@long-string.salesforce.com>
X-ContactName: "sfdc fox"
X-ContactPhone: "(212) 555-4240"
X-ContactEmail: "not-a-real-address@domain.tld"
Date: Mon, 30 Jun 2014 12:00 +07:00
Subject: "You got mail!"

This is a message that includes custom headers.
.

The headers are not name-value pairs, as a header may appear more than once (usually Received-By will be repeated once per each server that routed the message). They should appear in the headers array in order.

"How" you send this data will depend on what resources and capabilities you have access to. If I were tasked with this, I would probably use a Perl script to spool messages directly to sendmail, but that is purely an implementation detail.

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.