Re: How to get SMTP address from Distinguished Name

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dmitry Streblechenko (dmitry_at_dimastr.com)
Date: 02/12/05


Date: Fri, 11 Feb 2005 18:54:23 -0700

1. No, Session.GetMessage does not display a prompt, so it must be something
else.
2. Where does the other address entry come from? If you only know the name,
use Namespace.CreateRecipients or Namespace.AddressLists to drill down to a
particular address list and find an entry in its contents table.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

<asma.alam@gmail.com> wrote in message
news:1108156379.535507.3800@z14g2000cwz.googlegroups.com...
> Thanks Dimitry and Sue for that quick response. I can now get the SMTP
> addresses of all in the TO list using Redemption. However I still get
> the Outlook security prompt dialog.
>
> Presumably this happens when I detect the incoming objMsg As
> Outlook.MailItem and the code runs to convert it to a CDO message using
>
> objCDOMsg = objSession.GetMessage(strEntryID, strStoreID)
> before passing it onto the Redemption routines.
> How can I avoid such prompts? I cant have user interventions in my
> process.
>
>
> And secondly Can you please tell me how to change the following code to
> use the name of a person OTHER than the CurrentUser. It works fine to
> return the SMTP address of the CurrentUser so I was trying to use it
> return other users Smtp addresses, by somehow trying to impersonate
> another user but I'm not really sure how.
>
> Set objSession = CreateObject("MAPI.Session")
> objSession.Logon "", "", False, False
> Set objAddressEntry = objSession.CurrentUser
> strAddressEntryID = objAddressEntry.ID
> ' Get the SMTP address
> strEMailAddress =
> objSession.GetAddressEntry(strAddressEntryID).Fields(CdoPR_EMAIL)
>
> thanks again
> Asma
>



Relevant Pages

  • Re: one-off reply recipient
    ... I have never seen Outlook create a one-off recipient other than of the SMTP ... The one-off entry contains an address type field. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Outlook -> remote exchange -> always wants a password
    ... Home will prompt for the login credentials every time even if configured ... Outlook 2003 if you have the necessary patch level on XP and tweak at ... useful on the client configuration side, I don't have time to revisit and ... Note that I AM using NTLM authentication, ...
    (microsoft.public.windows.server.sbs)
  • Re: Outlook login prompt on sbs2000 exchange
    ... Check the ipconfig/all on the clients. ... > After that, they can close Outlook and reopen with no prompt, but log off ... > the console wizard, or readd the PC's with the wizard? ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: password
    ... Thank you for the workaround; however, it didn't seem to work for my case. ... but the prompt kept popping up. ... Outlook never prompted for password when it is opened. ... time that the password was prompted was during adding the profile in ...
    (microsoft.public.exchange.setup)
  • Re: password
    ... an email profile ... but the prompt kept popping up. ... Outlook never prompted for password when it is opened. ... The user then opens Outlook, ...
    (microsoft.public.exchange.setup)