Get SMTP address of sender in outlook 2003

Status
Not open for further replies.
N

Nagaraj

Hi,

I want to retrieve smtp address of sender in outlook 2003 plugin development

I used

mailItem.SenderEmailAddress

but it is not giving any value

In 2007 I got the value by

mailItem.SendUsingAccount.SmtpAddress;

How to get the same value in outlook 2003?

Thanks

Nagaraj

Nagaraj Tadipatri
 
Hello Nagaraj,

You can get this by Using MAPI,

Or you can simply create one ContactItem and set Exchange address which you

are getting from mailItem.SenderEmailAddress

to "Email1Address" property of ContactItem, After saving this Outlook will

resolve smtp address for you. Now you will have smtp address in

"Email1DisplayName" Propery of ContactItem.

And dont forget to delete this created ContactItem (from deleted Items

also).

Thanks

Ashutosh

"Nagaraj" <nagaraj.tadipatri@gmail.com> wrote in message

news:20056CE6-CFAA-416A-9A0E-7C3E29A1B711@microsoft.com...
> Hi,

> I want to retrieve smtp address of sender in outlook 2003 plugin
> development

> I used
> mailItem.SenderEmailAddress
> but it is not giving any value

> In 2007 I got the value by
> mailItem.SendUsingAccount.SmtpAddress;

> How to get the same value in outlook 2003?

> Thanks

> Nagaraj

> > Nagaraj Tadipatri
 
That is not necessarily true, none of the entries from my GAL that also have

contacts show the SMTP address in the display name. To actually get the SMTP

address see http://www.outlookcode.com/d/code/getsenderaddy.htm#redemption

and http://www.cdolive.com/cdo5.htm#EMailAddressOfSender for examples.

"Ashutosh Jogdande" <ashutosh_jogdande@persistent.co.in> wrote in message

news:%23U6Vm18%23JHA.3612@TK2MSFTNGP04.phx.gbl...
> Hello Nagaraj,

> You can get this by Using MAPI,
> Or you can simply create one ContactItem and set Exchange address which
> you are getting from mailItem.SenderEmailAddress
> to "Email1Address" property of ContactItem, After saving this Outlook will
> resolve smtp address for you. Now you will have smtp address in
> "Email1DisplayName" Propery of ContactItem.
> And dont forget to delete this created ContactItem (from deleted Items
> also).

> Thanks
> Ashutosh

> "Nagaraj" <nagaraj.tadipatri@gmail.com> wrote in message
> news:20056CE6-CFAA-416A-9A0E-7C3E29A1B711@microsoft.com...
> > Hi,
>

>> I want to retrieve smtp address of sender in outlook 2003 plugin
> > development
>

>> I used
> > mailItem.SenderEmailAddress
> > but it is not giving any value
>

>> In 2007 I got the value by
> > mailItem.SendUsingAccount.SmtpAddress;
>

>> How to get the same value in outlook 2003?
>

>> Thanks
>

>> Nagaraj
>

>> > > Nagaraj Tadipatri


>
 
Thanks for your information. The problem is solved by the following line

sender = Application.Session.CurrentUser.Address

Nagaraj Tadipatri
wrote:


> That is not necessarily true, none of the entries from my GAL that also have
> contacts show the SMTP address in the display name. To actually get the SMTP
> address see http://www.outlookcode.com/d/code/getsenderaddy.htm#redemption
> and http://www.cdolive.com/cdo5.htm#EMailAddressOfSender for examples.

> >

>

> "Ashutosh Jogdande" <ashutosh_jogdande@persistent.co.in> wrote in message
> news:%23U6Vm18%23JHA.3612@TK2MSFTNGP04.phx.gbl...
> > Hello Nagaraj,
> > You can get this by Using MAPI,
> > Or you can simply create one ContactItem and set Exchange address which
> > you are getting from mailItem.SenderEmailAddress
> > to "Email1Address" property of ContactItem, After saving this Outlook will
> > resolve smtp address for you. Now you will have smtp address in
> > "Email1DisplayName" Propery of ContactItem.
> > And dont forget to delete this created ContactItem (from deleted Items
> > also).
> > Thanks
> > Ashutosh
> > "Nagaraj" <nagaraj.tadipatri@gmail.com> wrote in message
> > news:20056CE6-CFAA-416A-9A0E-7C3E29A1B711@microsoft.com...
> >> Hi,
> >
> >> I want to retrieve smtp address of sender in outlook 2003 plugin
> >> development
> >
> >> I used
> >> mailItem.SenderEmailAddress
> >> but it is not giving any value
> >
> >> In 2007 I got the value by
> >> mailItem.SendUsingAccount.SmtpAddress;
> >
> >> How to get the same value in outlook 2003?
> >
> >> Thanks
> >
> >> Nagaraj
> >
> >> > >> Nagaraj Tadipatri

> >


>
 
That will give you the current user's address, but it has nothing to do with

the sender address of any particular message in your inbox.

Dmitry Streblechenko (MVP)

-

"Nagaraj" <nagaraj.tadipatri@gmail.com> wrote in message

news:BC6AF7D9-2A90-4507-ADD0-87936BDCD665@microsoft.com...
> Thanks for your information. The problem is solved by the following line

> sender = Application.Session.CurrentUser.Address

> > Nagaraj Tadipatri

> " - " wrote:
>
> > That is not necessarily true, none of the entries from my GAL that also
> > have
> > contacts show the SMTP address in the display name. To actually get the
> > SMTP
> > address see
> > http://www.outlookcode.com/d/code/getsenderaddy.htm#redemption
> > and http://www.cdolive.com/cdo5.htm#EMailAddressOfSender for examples.
>

>
>> > >

> >

>

>
>
>
>
>
>> "Ashutosh Jogdande" <ashutosh_jogdande@persistent.co.in> wrote in message
> > news:%23U6Vm18%23JHA.3612@TK2MSFTNGP04.phx.gbl...
> > > Hello Nagaraj,
> >> > You can get this by Using MAPI,
> > > Or you can simply create one ContactItem and set Exchange address which
> > > you are getting from mailItem.SenderEmailAddress
> > > to "Email1Address" property of ContactItem, After saving this Outlook
> > > will
> > > resolve smtp address for you. Now you will have smtp address in
> > > "Email1DisplayName" Propery of ContactItem.
> > > And dont forget to delete this created ContactItem (from deleted Items
> > > also).
> >> > Thanks
> > > Ashutosh
> >> > "Nagaraj" <nagaraj.tadipatri@gmail.com> wrote in message
> > > news:20056CE6-CFAA-416A-9A0E-7C3E29A1B711@microsoft.com...
> > >> Hi,
> > >
>> >> I want to retrieve smtp address of sender in outlook 2003 plugin
> > >> development
> > >
>> >> I used
> > >> mailItem.SenderEmailAddress
> > >> but it is not giving any value
> > >
>> >> In 2007 I got the value by
> > >> mailItem.SendUsingAccount.SmtpAddress;
> > >
>> >> How to get the same value in outlook 2003?
> > >
>> >> Thanks
> > >
>> >> Nagaraj
> > >
>> >> > > >> Nagaraj Tadipatri
> >> >

>

>>
 
And it also won't necessarily give you an SMTP address. If CurrentUser is an

Exchange DN that's what you'll get, not an SMTP address.

"Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message

news:%23mHXI9Z$JHA.3732@TK2MSFTNGP02.phx.gbl...
> That will give you the current user's address, but it has nothing to do
> with the sender address of any particular message in your inbox.

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "Nagaraj" <nagaraj.tadipatri@gmail.com> wrote in message
> news:BC6AF7D9-2A90-4507-ADD0-87936BDCD665@microsoft.com...
> > Thanks for your information. The problem is solved by the following line
>

>> sender = Application.Session.CurrentUser.Address
>

>
>> > > Nagaraj Tadipatri
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
E msg attachments lose their recipients "smtp" address Using Outlook 2
K External Mtg Invitees have =SMTP: added to email address after mtg saved Using Outlook 5
C How to get SMTP out of email address when exporting contacts? Using Outlook 2
williamlambton Changing 'To' field in message lists to show SMTP address only. Using Outlook 2
V Recipient's SMTP address Outlook VBA and Custom Forms 1
M Getting the SMTP address from an EX address Outlook VBA and Custom Forms 7
R Microsoft Outlook 2016 - Gmail not sending, asks for password for SMTP, tried different ports Using Outlook 23
S Send email via SMTP - use transport rules to add to senders inbox (then rule to move to sent items Exchange Server Administration 1
T SMTP messages stuck in Outbox Using Outlook 0
Diane Poremsky Exchange Server and SMTP Servers Using Outlook 0
Diane Poremsky Common Outlook Outgoing Server (SMTP) Errors Using Outlook 0
S Outlook 2013 sends plain text with attachment mail as uuencoded with SMTP conn Using Outlook 2
T Outlook 2013, McAfee Security Suite and SMTP/POP3 Using Outlook 3
H Mailing List account needed with remote smtp auth facility Exchange Server Administration 3
N Beginner - Setting SMTP settings/travelling Using Outlook 4
C Custom Form that allows a single SMTP header to be parsed to Field Chooser? Using Outlook 4
N cannot send emails-SMTP Ports not working for Hotmail Pop3 Using Outlook 3
D how can bounce email be captured in smtp server Exchange Server Administration 3
S Incoming and Outgoing SMTP server settings Using Outlook 7
Y Sending message with multiple SMTP BCCs Outlook VBA and Custom Forms 2
P Email address auto-completes work fine on laptop, but no longer on desktop Using Outlook 2
H Copying email address(es) in body of email and pasting in To field Outlook VBA and Custom Forms 1
P VBA to add email address to Outlook 365 rule Outlook VBA and Custom Forms 0
Rupert Dragwater How to permanently remove an email address Using Outlook 9
Bardiferous Weird Contacts Behavior - Can't find any in any address book, but they're in there Using Outlook 3
L Specific Incoming Email Address Immediately Deleted Using Outlook 2
L Unable to Use Alias as From Address Using Outlook 2
H Preventing the 'email address fetch from Exchange' crashing email reading code Exchange Server Administration 0
D multiple email accounts - why do I have to choose the "from" account address?? Using Outlook 2
whizzard Change FROM address based on TO or CC address Outlook VBA and Custom Forms 8
C Outlook FROM ADDRESS -Outlook.com and Android Using Outlook 1
O What would be the recommended way to change an email address (family member)? Using Outlook 0
L Checking Sender Email Address for trusted domain from list on intranet Outlook VBA and Custom Forms 4
J How do you disable address search box when typing @ in body of email? Using Outlook 0
Victor.Ayala Automated way to check the option "Show this folder as an email Address Book" Outlook VBA and Custom Forms 2
D Wrong email address in Outlook 2003 "From" tab in new outgoing emails Using Outlook 4
M Gmail address associated with Outlook on new phone Using Outlook 9
e_a_g_l_e_p_i Outlook 2010 How to set default email address for website links Using Outlook 3
O Same email address, same person, names in so many ways Using Outlook 4
R Capture Sender's Display name and Address Outlook VBA and Custom Forms 3
D auto forward base on email address in body email Outlook VBA and Custom Forms 0
N contact list seen in Contact folder but knot in Address book or when 'TO' button is clicked in new email Using Outlook 0
C WARNING - DO NOT USE AN OUTLOOK.COM ADDRESS FOR GOOGLE ACCOUNT RECOVERY EMAIL Using Outlook 10
D Outlook Address Book Using Outlook 0
Terry Sullivan Sender Field Displays My E-Mail Address, Not My Name Using Outlook 1
L Email with correct To address but displaying name of a related person Using Outlook 0
1 Incorrectly Setup a Rule at Domain level to not allow address from outside domain Exchange Server Administration 2
D Is a sub folder under contacts necessary to be able to name an Address Book? Using Outlook 1
A Outlook replies not using "delivered to" address in From Using Outlook 1
T "Words In Recipient's Address" Rule Causes Outlook To Stop Processing Rules Using Outlook 3

Similar threads

Back
Top