Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: SMTP property tag


Message #1 by "Chaikin, Yaakov Y" <yaakov.y.chaikin@b...> on Thu, 21 Mar 2002 10:42:10 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D0EE.F6A44880
Content-Type: text/plain

Hi,
 
Does anyone know what the name of the property tag is for retrieving the
smtp email address from the Exchange server?
 
In GAL, when you right click on a person and got properties, there is a tab
there called "Email Addresses", which lists all kinds of email type
addresses. Does anyone know how to access that? One of them is the smtp
address.
 
Thank you.
 
Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:        xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...>  
 

Message #2 by Eli Schilling <eschilli@t...> on Thu, 21 Mar 2002 08:24:35 -0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D0F4.E3BD82D0
Content-Type: text/plain;
	charset="iso-8859-1"

Hello, this is the code I use to resolve a person's name to their SMTP
address in the GAL.  This is currently used with Exchange 5.5, I haven't
tested it with Exchange 2k yet:
 
'******************************
strMailbox = "Jim Smith"
strExchangeServer = "MyExchangeServer"
 
  set objSession = Server.CreateObject("MAPI.Session")
 
  strProfileInfo = strExchangeServer & vbLF & strMailbox

  objSession.Logon "", "", False,True,0,True,strProfileInfo
 
  myUser = objSession.CurrentUser
  Set objMessage = objSession.Outbox.Messages.Add 
  Set objRecip = objMessage.Recipients.Add 
  objRecip.Name = request.form("strRecip")  'TO DO: Change this to a valid
display name. 
 
  On Error Resume Next
  Err.Clear
  objRecip.Resolve  
  If Err.Number = 0 Then
   Set objField = objRecip.AddressEntry.Fields(&H800F101E)  '<---This gets
the full string from the SMTP space
  For Each v In objField.Value   
   If Mid(v, 1, 4) = "SMTP" Then        
    strEmail = v
   End If 
  Next
 
   strRecipient = mid(strEmail, 6, 28)   '<--This is where I strip of the
extraneous junk
 
'**********************************
 
 
Hope this helps,
Eli
-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 7:42 AM
To: ASP CDO
Subject: [asp_cdo] SMTP property tag


Hi,
 
Does anyone know what the name of the property tag is for retrieving the
smtp email address from the Exchange server?
 
In GAL, when you right click on a person and got properties, there is a tab
there called "Email Addresses", which lists all kinds of email type
addresses. Does anyone know how to access that? One of them is the smtp
address.
 
Thank you.
 
Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:        xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...>  
 
--- 

Message #3 by "Chaikin, Yaakov Y" <yaakov.y.chaikin@b...> on Thu, 21 Mar 2002 12:18:39 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D0FC.711879D0
Content-Type: text/plain

Hi,

 

Actually, that didn't work. If I leave it in Hex, it gives me a type
mismatch error. If I convert it to Long, it gives me an Overflow error.

 

Seems like too high of a number. Are you sure this is correct (&H800F101E)?

 

Thanks.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:         xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...> 

-----Original Message-----
From: Eli Schilling [mailto:eschilli@t...] 
Sent: Thursday, March 21, 2002 11:25 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

 

Hello, this is the code I use to resolve a person's name to their SMTP
address in the GAL.  This is currently used with Exchange 5.5, I haven't
tested it with Exchange 2k yet:

 

'******************************

strMailbox = "Jim Smith"
strExchangeServer = "MyExchangeServer"

 

  set objSession = Server.CreateObject("MAPI.Session")

 

  strProfileInfo = strExchangeServer & vbLF & strMailbox


  objSession.Logon "", "", False,True,0,True,strProfileInfo

 

  myUser = objSession.CurrentUser
  Set objMessage = objSession.Outbox.Messages.Add 
  Set objRecip = objMessage.Recipients.Add 
  objRecip.Name = request.form("strRecip")  'TO DO: Change this to a valid
display name. 

 

  On Error Resume Next
  Err.Clear
  objRecip.Resolve  
  If Err.Number = 0 Then
   Set objField = objRecip.AddressEntry.Fields(&H800F101E)  '<---This gets
the full string from the SMTP space
  For Each v In objField.Value   
   If Mid(v, 1, 4) = "SMTP" Then        
    strEmail = v
   End If 
  Next
 
   strRecipient = mid(strEmail, 6, 28)   '<--This is where I strip of the
extraneous junk

 

'**********************************

 

 

Hope this helps,

Eli

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 7:42 AM
To: ASP CDO
Subject: [asp_cdo] SMTP property tag

Hi,

 

Does anyone know what the name of the property tag is for retrieving the
smtp email address from the Exchange server?

 

In GAL, when you right click on a person and got properties, there is a tab
there called "Email Addresses", which lists all kinds of email type
addresses. Does anyone know how to access that? One of them is the smtp
address.

 

Thank you.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:        xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...>  

 

--- 

--- 


Message #4 by Eli Schilling <eschilli@t...> on Thu, 21 Mar 2002 09:19:36 -0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D0FC.931A60C0
Content-Type: text/plain;
	charset="iso-8859-1"

It is up and working on my web server right now.  What version of Exchange
are you using?
 
I have this running on a Win2k server with IIS 5 and Exchange 5.5.

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 9:19 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag



Hi,

 

Actually, that didn't work. If I leave it in Hex, it gives me a type
mismatch error. If I convert it to Long, it gives me an Overflow error.

 

Seems like too high of a number. Are you sure this is correct (&H800F101E)?

 

Thanks.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:         xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...> 

-----Original Message-----
From: Eli Schilling [mailto:eschilli@t...] 
Sent: Thursday, March 21, 2002 11:25 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

 

Hello, this is the code I use to resolve a person's name to their SMTP
address in the GAL.  This is currently used with Exchange 5.5, I haven't
tested it with Exchange 2k yet:

 

'******************************

strMailbox = "Jim Smith"
strExchangeServer = "MyExchangeServer"

 

  set objSession = Server.CreateObject("MAPI.Session")

 

  strProfileInfo = strExchangeServer & vbLF & strMailbox


  objSession.Logon "", "", False,True,0,True,strProfileInfo

 

  myUser = objSession.CurrentUser
  Set objMessage = objSession.Outbox.Messages.Add 
  Set objRecip = objMessage.Recipients.Add 
  objRecip.Name = request.form("strRecip")  'TO DO: Change this to a valid
display name. 

 

  On Error Resume Next
  Err.Clear
  objRecip.Resolve  
  If Err.Number = 0 Then
   Set objField = objRecip.AddressEntry.Fields(&H800F101E)  '<---This gets
the full string from the SMTP space
  For Each v In objField.Value   
   If Mid(v, 1, 4) = "SMTP" Then        
    strEmail = v
   End If 
  Next
 
   strRecipient = mid(strEmail, 6, 28)   '<--This is where I strip of the
extraneous junk

 

'**********************************

 

 

Hope this helps,

Eli

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 7:42 AM
To: ASP CDO
Subject: [asp_cdo] SMTP property tag

Hi,

 

Does anyone know what the name of the property tag is for retrieving the
smtp email address from the Exchange server?

 

In GAL, when you right click on a person and got properties, there is a tab
there called "Email Addresses", which lists all kinds of email type
addresses. Does anyone know how to access that? One of them is the smtp
address.

 

Thank you.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:        xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...>  

 

--- 

--- 

--- 


Message #5 by "Chaikin, Yaakov Y" <yaakov.y.chaikin@b...> on Thu, 21 Mar 2002 12:42:30 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D0FF.C67D8FC0
Content-Type: text/plain

I am using the value of your tag in my VB program passing it into
AddressEntry.Fields(&H800F101E). The VB program is a COM add-in for outlook.

 

Any ideas?

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:         xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...> 

-----Original Message-----
From: Eli Schilling [mailto:eschilli@t...] 
Sent: Thursday, March 21, 2002 12:20 PM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

 

It is up and working on my web server right now.  What version of Exchange
are you using?

 

I have this running on a Win2k server with IIS 5 and Exchange 5.5.

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 9:19 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

Hi,

 

Actually, that didn't work. If I leave it in Hex, it gives me a type
mismatch error. If I convert it to Long, it gives me an Overflow error.

 

Seems like too high of a number. Are you sure this is correct (&H800F101E)?

 

Thanks.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:         xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...> 

-----Original Message-----
From: Eli Schilling [mailto:eschilli@t...] 
Sent: Thursday, March 21, 2002 11:25 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

 

Hello, this is the code I use to resolve a person's name to their SMTP
address in the GAL.  This is currently used with Exchange 5.5, I haven't
tested it with Exchange 2k yet:

 

'******************************

strMailbox = "Jim Smith"
strExchangeServer = "MyExchangeServer"

 

  set objSession = Server.CreateObject("MAPI.Session")

 

  strProfileInfo = strExchangeServer & vbLF & strMailbox


  objSession.Logon "", "", False,True,0,True,strProfileInfo

 

  myUser = objSession.CurrentUser
  Set objMessage = objSession.Outbox.Messages.Add 
  Set objRecip = objMessage.Recipients.Add 
  objRecip.Name = request.form("strRecip")  'TO DO: Change this to a valid
display name. 

 

  On Error Resume Next
  Err.Clear
  objRecip.Resolve  
  If Err.Number = 0 Then
   Set objField = objRecip.AddressEntry.Fields(&H800F101E)  '<---This gets
the full string from the SMTP space
  For Each v In objField.Value   
   If Mid(v, 1, 4) = "SMTP" Then        
    strEmail = v
   End If 
  Next
 
   strRecipient = mid(strEmail, 6, 28)   '<--This is where I strip of the
extraneous junk

 

'**********************************

 

 

Hope this helps,

Eli

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 7:42 AM
To: ASP CDO
Subject: [asp_cdo] SMTP property tag

Hi,

 

Does anyone know what the name of the property tag is for retrieving the
smtp email address from the Exchange server?

 

In GAL, when you right click on a person and got properties, there is a tab
there called "Email Addresses", which lists all kinds of email type
addresses. Does anyone know how to access that? One of them is the smtp
address.

 

Thank you.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:        xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...>  

 

--- 

--- 

--- 

--- 


Message #6 by Eli Schilling <eschilli@t...> on Thu, 21 Mar 2002 09:38:46 -0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D0FF.407DD1F0
Content-Type: text/plain;
	charset="iso-8859-1"

Ooooooh.  That makes all the difference.  I don't know what the conversion
is for VB.  Sorry.

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 9:43 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag



I am using the value of your tag in my VB program passing it into
AddressEntry.Fields(&H800F101E). The VB program is a COM add-in for outlook.

 

Any ideas?

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:         xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...> 

-----Original Message-----
From: Eli Schilling [mailto:eschilli@t...] 
Sent: Thursday, March 21, 2002 12:20 PM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

 

It is up and working on my web server right now.  What version of Exchange
are you using?

 

I have this running on a Win2k server with IIS 5 and Exchange 5.5.

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 9:19 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

Hi,

 

Actually, that didn't work. If I leave it in Hex, it gives me a type
mismatch error. If I convert it to Long, it gives me an Overflow error.

 

Seems like too high of a number. Are you sure this is correct (&H800F101E)?

 

Thanks.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:         xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...> 

-----Original Message-----
From: Eli Schilling [mailto:eschilli@t...] 
Sent: Thursday, March 21, 2002 11:25 AM
To: ASP CDO
Subject: [asp_cdo] RE: SMTP property tag

 

Hello, this is the code I use to resolve a person's name to their SMTP
address in the GAL.  This is currently used with Exchange 5.5, I haven't
tested it with Exchange 2k yet:

 

'******************************

strMailbox = "Jim Smith"
strExchangeServer = "MyExchangeServer"

 

  set objSession = Server.CreateObject("MAPI.Session")

 

  strProfileInfo = strExchangeServer & vbLF & strMailbox


  objSession.Logon "", "", False,True,0,True,strProfileInfo

 

  myUser = objSession.CurrentUser
  Set objMessage = objSession.Outbox.Messages.Add 
  Set objRecip = objMessage.Recipients.Add 
  objRecip.Name = request.form("strRecip")  'TO DO: Change this to a valid
display name. 

 

  On Error Resume Next
  Err.Clear
  objRecip.Resolve  
  If Err.Number = 0 Then
   Set objField = objRecip.AddressEntry.Fields(&H800F101E)  '<---This gets
the full string from the SMTP space
  For Each v In objField.Value   
   If Mid(v, 1, 4) = "SMTP" Then        
    strEmail = v
   End If 
  Next
 
   strRecipient = mid(strEmail, 6, 28)   '<--This is where I strip of the
extraneous junk

 

'**********************************

 

 

Hope this helps,

Eli

-----Original Message-----
From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
Sent: Thursday, March 21, 2002 7:42 AM
To: ASP CDO
Subject: [asp_cdo] SMTP property tag

Hi,

 

Does anyone know what the name of the property tag is for retrieving the
smtp email address from the Exchange server?

 

In GAL, when you right click on a person and got properties, there is a tab
there called "Email Addresses", which lists all kinds of email type
addresses. Does anyone know how to access that? One of them is the smtp
address.

 

Thank you.

 

Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice:     xxx-xxx-xxxx
Fax:        xxx-xxx-xxxx
Yaakov.Y.Chaikin@b... <mailto:yaakov.y.chaikin@b...>  

 

--- 

--- 

--- 

--- 

--- 


Message #7 by "Siegfried Weber" <sweber@c...> on Tue, 26 Mar 2002 23:03:23 +0100
Try code similar like it is shown at:

http://www.cdolive.com/cdo5.htm#SMTPAddressOfCurrentUser

<Siegfried />

> -----Original Message-----
> From: Chaikin, Yaakov Y [mailto:yaakov.y.chaikin@b...]
> Sent: Thursday, March 21, 2002 4:42 PM
> To: ASP CDO
> Subject: [asp_cdo] SMTP property tag
>
> Hi,
>
> Does anyone know what the name of the property tag is for retrieving
the
> smtp email address from the Exchange server?
>
> In GAL, when you right click on a person and got properties, there is
a
> tab there called "Email Addresses", which lists all kinds of email
type
> addresses. Does anyone know how to access that? One of them is the
smtp
> address.
>
> Thank you.
>
> Yaakov Chaikin
> Software Engineer
> IT Department
> BAE SYSTEMS
> Voice:     xxx-xxx-xxxx
> Fax:        xxx-xxx-xxxx
> Yaakov.Y.Chaikin@b...
>

  Return to Index