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.
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: <[email protected]>
To: <[email protected]>
X-ContactName: "sfdc fox"
X-ContactPhone: "(212) 555-4240"
X-ContactEmail: "[email protected]"
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.