Link to home
Start Free TrialLog in
Avatar of Alyanto
AlyantoFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Email Body

I have been asked to extract the mail from an outlook account problematically.

I have go so far but what I am getting is the entire email's trail.  Is there a means to get this information.

 
private void btnAddToSupportCall_Click(Office.CommandBarButton ctrl, ref bool cancel)
{
    string delimeter = "x###x";
    var emailAddress = this.Application.ActiveExplorer().Session.CurrentUser.AddressEntry.GetExchangeUser().PrimarySmtpAddress;

    Outlook.MailItem mailItem = Inspector.CurrentItem as Outlook.MailItem;
    string str = mailItem.SenderName + delimeter + mailItem.SenderEmailAddress + delimeter + mailItem.Subject + delimeter + mailItem.Body + delimeter + mailItem.ReceivedTime.Date.ToShortDateString() + delimeter + mailItem.ReceivedTime.ToShortTimeString();
    new FormAddEmailToSupportCall(str, delimeter, emailAddress).ShowDialog();
}

Open in new window

Avatar of Kimputer
Kimputer

Hard to read what you actually mean.
Do you mean you want the internet headers of that email?
Avatar of Alyanto

ASKER

Hi Kimputer
To clarify one of my colleagues asked me for a favour and then I used a spell checked without checking.  The the original should read.

I have been asked to extract the mail from an outlook account programmatically.

I have go so far but what I am getting is the entire email's trail.  Is there a means to get this information.  

I spoke to her again and what she wanted was to connect to an exchange server under a specific account and extract on arrival the last part of an email's chain.  The code above is what was sent to me  by her.  I am hoping some has done this sort of thing before and has a bit of stock code they could share.

Kind regards

Alyanto
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alyanto

ASKER

I finally got an answer from our junior and he has been able to move the problem based on the ideas here.