Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / May 2007

Tip: Looking for answers? Try searching our database.

Outlook object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike P - 10 May 2007 17:13 GMT
I am using the Outlook.MailItem object to extract fields such as
ReceivedBy, SenderName and Subject from emails, but it seems like there
is no way to get at the actual received by email address and sent by
email address, I can only get at the actual name of the sender and
recipient.  

Is there any other way to get these email addresses?
Andy - 10 May 2007 17:29 GMT
> I am using the Outlook.MailItem object to extract fields such as
> ReceivedBy, SenderName and Subject from emails, but it seems like there
[quoted text clipped - 3 lines]
>
> Is there any other way to get these email addresses?

Did you look at the Recipients collection on MailItem, as well as
SenderEmailAddress?
Mike P - 11 May 2007 09:03 GMT
I can't find SenderEmailAddress in intellisense for this object...are
you sure you can get this?
Mike P - 11 May 2007 09:58 GMT
SenderEmailAddress is only available in Outlook 11...is there anything
similar I can use in Outlook 10?
Mike P - 11 May 2007 10:35 GMT
I have found this code in VB to get the ReplyTo address.  Can anybody
tell me how to declare the Reply object?

Set objReply = objMsg.Reply
 On Error Resume Next
 Set objRecip = objReply.Recipients.Item(1)
 If Err = 0 Then
   ' address will be in Name or Address depending
   ' on sending application and type of address
   strAddress = objRecip.Address
   If strAddress = "" Then
     strAddress = objRecip.Name
   End If
 ElseIf Err = 287 Then
   'handle possible security patch error
   strAddress = ""
   MsgBox "The Outlook E-mail Security Patch is " & _
          "apparently installed on this machine. " & _
          "You must response Yes to the prompt about " & _
          "accessing e-mail addresses if you want to " & _
          "get the Reply To address.", vbExclamation, _
          "GetReplyToAddress"
 End If
Paul Shapiro - 11 May 2007 17:22 GMT
It looks like it's the reply to an Outlook mail item, which would be another
mail item, so try Outlook.mailItem if you've included the Outlook reference.
If that doesn't work you can dim as Object.
Paul Shapiro

>I have found this code in VB to get the ReplyTo address.  Can anybody
> tell me how to declare the Reply object?
[quoted text clipped - 19 lines]
>           "GetReplyToAddress"
>  End If

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.