How do I Post Email to a Web Application? RRS feed

  • Question

  • Hello all,

    I am writing a web application that has many of the characteristics of a CRM system. For now, it is only a demonstration application that I am writing on the side. A critical capability is to post mail items to the application. Such emails provide a record of client interactions and/or discussions. Unfortunately, I have not been able to figure out the right direction to proceed in order to do this in Outlook and/or Exchange. Does anyone have any thoughts or recommendations to get me started down the right path?

    I need to process both incoming and outgoing messages. The web application needs to store the email. Attachments need not be captured. Users need to assign the email to one or more categories and enter optional notes as text. Users also need to identify the client(s). Not all emails will be to/from the clients but may be internal discussions about the clients. The web application will place the email with the additional information into a database. Here is how I think it might work:

    - User drags the email to a folder or clicks on a button in the ribbon.

    - Outlook displays a dialog box asking the user to identify the client, categorize the correspondence, and add any notes.

    - Outlook either forwards the email with the additional data via SMTP to the web application or posts the information in another way. Posting does not have to happen in real time. So, this action could happen periodically.

    An additional need is to somehow get the right client list into the dialog box. We can assume that all clients are personal Outlook contacts, but not all contacts are clients.

    To the maximum extent possible, I need to keep this stuff on the client. I do not have access to the Exchange Server, except as a user. So, there may be two solutions: a kludge for the demo and the real and more complicated right answer.

    The target environment for my demo is Outlook 2007 and Exchange 2010. Sharepoint is not available. The web application is HTML5-based, using a NoSQL database, JQuery, and Node.js.

    Appreciate any advice!

    • Moved by 许阳(无锡) Thursday, August 16, 2012 6:13 AM EWS Issue (From:Outlook for Developers)
    Tuesday, August 14, 2012 7:54 PM

All replies

  • access to exchange as a user is sufficient. From web application you can use EWS to send mails as that user or recieve mails from that user's mailbox and store it in your database. As for outlook integration - you can do it as an outlook add-in.
    • Marked as answer by Scott- Wednesday, August 15, 2012 8:38 PM
    • Unmarked as answer by Scott- Wednesday, August 15, 2012 8:39 PM
    Wednesday, August 15, 2012 4:58 AM
  • Many thanks! This is enough to get me started! All, other comments and suggestions still welcome.
    Wednesday, August 15, 2012 8:38 PM
  • As I thought through this, I realized that I can't send an email from Outlook/Exchange to an local host SMTP server. Of course, the Exchange server will not recognize it. I am now thinking that I could put the email into text (or HTML) and use an HTTP POST command to upload it to my server. I see some evidence on line that I can do this in VBA, but can't find much in the Outlook object model.
    Thursday, August 16, 2012 1:56 AM
  • Hi Scott,

    Thanks for posting in the MSDN Forum.

    As far as I know, that Office system doesn't fit used on server side. Please take a look at I think what DamianD's suggest is the best way to approach your goal. And I would move you post it at for better support.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 16, 2012 2:02 AM