none
Outlook Custom Email Form: How to Receive and Programmatically Process Custom Fields RRS feed

  • Question

  • I have a requirement to design a custom outlook email form to add additional fields for creating a help ticket. The mail will be sent to an email address and there is a web service designed with Mule Studio to poll the email server for incoming tickets. The goal is to extract both standard and custom fields from the email server and create a ticket for the sender. But each time email comes through the custom fields are not present in the body or header of the email. Please how can this requirement be achieved?

    Friday, April 24, 2015 8:46 AM

Answers

All replies

  • Hello Ayemi,

    Are messages in Transport Neutral Encapsulation Format (TNEF)?

    Note, the user defined properties should be defined on the recipient delivery store. Or they will be vanished if the target Inbox folder doesn't have them defined. See Changes to custom properties in Outlook for more information. 

    Friday, April 24, 2015 9:32 AM
  • Are messages sent between 2 Exchange mailboxes in the same domain or over SMTP?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, April 24, 2015 3:02 PM
  • Yes between two Exchange inboxes! Thank you Dmitry.
    Tuesday, April 28, 2015 1:26 PM
  • Then MAPI properties should be preserved. How do you add the properties to the messages and send it? What do you see in the messages in the Sent Items and Inbox folders if you look at them with OutlookSpy (click IMessage)?  

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, April 28, 2015 1:31 PM
  • As Dmitry wrote, it does supposed to work inside the Exchange.
    But if it doesn't work, you can think about putting all the information in XML or JSON format in a .txt attachment in the email.
    In the other side you'll process it and read the info.
    This way you'll not need to fight the disappearing fields..
    Moshe

    Wednesday, April 29, 2015 3:59 PM
  • Hello Dmitry, this issue is still not resolved! The project am working on was on hold and now back to the front burner.

    With respect to your last suggestion, the properties are added to the message via the custom fields on the form. And yes, when the message is sent, I can see the custom fields in outlook at the receiving side. Also, I can view the custom properties in OutlookSpy IMessage. The problem is, we need those properties to appear with the rest of the default message headers when processed in an external program. Specifically, I am using Mule ESB to poll messages from Exchange server and process the email, but we are missing the custom fields in the message header.

    Thanks.

    Tuesday, September 22, 2015 12:17 PM
  • Please do you have any code snippet for doing that to share? I am not a VBA/VB Script developer.
    Tuesday, September 22, 2015 12:29 PM
  • Great Eugene, and thanks so much for your responses. Is VBA the preferred outlook scripting language or VB script?

    While I am keen on learning VBA or VB script in order to programatically format my custom fields in JSON and attach to my message, I want to know if there's no other way possible to make my custom fields accessible from message/MAPI header. Because I can see my custom fields in OutlookSpy. See below the custom message form, custom properties showing in OutlookSpy, and message log in MuleStudio (not showing the custom properties).

    Outlook Custom Message Form

    Custom outlook message

    OutlookSpy IMessage propertiesCustom fields showing in OutlookSpy IMessage

    Message Header Log in MuleStudio

    INFO  2015-09-29 05:33:43,339 [[exchange-sync].exchange-syncFlow.stage1.02] org.mule.api.processor.LoggerMessageProcessor: 
    org.mule.DefaultMuleMessage
    {
      id=43bbe150-6663-11e5-b730-9cb6549f682c
      payload=java.lang.String
      correlationId=<not set>
      correlationGroup=-1
      correlationSeq=-1
      encoding=UTF-8
      exceptionPayload=<not set>

    Message properties:
      INVOCATION scoped properties:
      INBOUND scoped properties:
        0Headers={Content-Type=text/plain; charset="us-ascii"}
        1Headers={Content-Type=text/html; charset="us-ascii"}
        Accept-Language=en-US
        Content-Language=en-US
        Content-Type=multipart/alternative;
    boundary="_000_1B89ABE6BC541449A318080B3FB883C5FE8E73EB_"
        Date=Tue, 29 Sep 2015 04:24:52 +0000
        From=Ayemi Musa <>
        List:Accept-Language=[en-US]
        List:Content-Language=[en-US]
        List:Content-Type=[multipart/alternative;
    boundary="_000_1B89ABE6BC541449A318080B3FB883C5FE8E73EB"]
        List:Date=[Tue, 29 Sep 2015 04:24:52 +0000]
        List:From=[Ayemi Musa <>]
        List:MIME-Version=[1.0]
        List:Message-ID=[<1B89ABE6BC541449A318080B3FB883C5FE8E73EB>]
        List:Received=[from  ([fe80::4150:6349:61bf:32ba]) by
      ([fe80::f9e7:4558:2e40:b2e1%13]) with mapi id
     14.02.0347.000; Tue, 29 Sep 2015 05:24:54 +0100]
        List:Subject=[SOLMAN TICKET]
        List:Thread-Index=[AdD6bowiRhvMZHFSRbyLICEpJbMe2g==]
        List:Thread-Topic=[SOLMAN TICKET]
        List:To=[]
        List:X-MS-Exchange-Organization-AuthAs=[Internal]
        List:X-MS-Exchange-Organization-AuthMechanism=[04]
        List:X-MS-Exchange-Organization-AuthSource=[]
        List:X-MS-Exchange-Organization-SCL=[-1]
        List:X-MS-Has-Attach=[]
        List:X-MS-TNEF-Correlator=[]
        List:x-originating-ip=[[0.0.0.0]]
        MIME-Version=1.0
        MULE_ORIGINATING_ENDPOINT=endpoint.imap.18359.localhost.1143
        Message-ID=<1B89ABE6BC541449A318080B3FB883C5FE8E73EB>
        Received=from CHQ-MBX-08.CHQ.NNPCGroup.local ([fe80::4150:6349:61bf:32ba]) by
     CHQ-CAH-01.CHQ.NNPCGroup.local ([fe80::f9e7:4558:2e40:b2e1%13]) with mapi id
     14.02.0347.000; Tue, 29 Sep 2015 05:24:54 +0100
        Thread-Index=AdD6bowiRhvMZHFSRbyLICEpJbMe2g==
        Thread-Topic=SOLMAN TICKET
        To=Ayemi Musa <Ayemi.Musa@NNPCGroup.com>
        X-MS-Exchange-Organization-AuthAs=Internal
        X-MS-Exchange-Organization-AuthMechanism=04
        X-MS-Exchange-Organization-AuthSource=
        X-MS-Exchange-Organization-SCL=-1
        X-MS-Has-Attach=
        X-MS-TNEF-Correlator=
        bccAddresses=
        ccAddresses=
        contentType=multipart/alternative;
    boundary="_000_1B89ABE6BC541449A318080B3FB883C5FE8E73EBCHQMBX08CHQNNPC_"
        fromAddress=
        replyToAddresses=
        sentDate=Tue Sep 29 05:24:52 WAT 2015
        subject=SOLMAN TICKET
        toAddresses=
        x-originating-ip=[10.0.48.124]
      OUTBOUND scoped properties:
        MULE_ENCODING=UTF-8
      SESSION scoped properties:
    }
    INFO  2015-09-29 05:33:43,340 [[exchange-sync].exchange-syncFlow.stage1.02] org.mule.component.simple.LogComponent: 

    Tuesday, September 29, 2015 4:55 AM