You need to sign in to do that
Don't have an account?
AK123
Inbound Email Headers
Hello,
We currently use Inbound Email services for our SF org, integrating various Outlook inboxes into SF as a custom object. I am having some difficulty collecting the inbound email headers from the email itself. If it helps, I am looking for a way to read the created date/time of email, which is contained in "email.headers", but I am getting errors try to capture and then display this information in SF. Any assistance or sample code will greatly be appreciated.
Thanks!
Hi,
Did you get a chance to go through the following KB:http://help.salesforce.com/apex/HTViewSolution?id=000004830&language=en_US
This explains how to access the header information from InboundEmail.header in Apex code
Hope this is helpful!
Link for reference:
http://login.salesforce.com/help/doc/en/code_inbound_email.htm
global class EmailtoAttendance implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
Attendance__c Attendance = new Attendance__c ();
Attendance.Success_Agent_Name__c = email.fromName.substring(0,email.fromName.indexOf(' '));
Messaging.InboundEmail.Header header= new Messaging.InboundEmail.Header();
email.headers=new Messaging.InboundEmail.Header[1];
header.name='Date'; header.value='';