ProxyAddresses Property

ProxyAddresses Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The ProxyAddresses property is a list of proxy addresses for the recipient.

Applies To

IMailRecipient Interface

Type Library

Microsoft CDO for Exchange Management Library

DLL Implemented In

CDOEXM.DLL

Syntax

[Visual Basic]Property ProxyAddresses As Variant

[C++]HRESULT get_ProxyAddresses(VARIANTpVal);
HRESULT put_ProxyAddresses(VARIANT Val);

Parameters

  • pVal
    Returns the value of the ProxyAddresses property as a reference to a VARIANT.
  • Val
    Sets the value of the ProxyAddresses property to the value of the VARIANT.

Remarks

The default value for this property is NULL (no proxy addresses defined).

This list can contain all types of proxies. The proxies must be prefixed by the proxy type (for example, "smtp:", "x400:").

Denote the primary reply address by putting the prefix in all caps. Thus the following specifies proxy2 as the primary reply address, and thereby specifies the others as receive only.

smtp:proxy1@somewhere.example.com

SMTP:proxy2@somewhere.example.com

x400:c=us;a= ;p=Domain;o=First Organization;s=Surname;g=Name;

Example

[Visual Basic] Sub SetProxyAddress(ServerName As String, _ DomainName As String, _ recipname As String)

'ServerName is something like "MyServer6"
'DomainName is something like "DC=MYDOMAIN3,DC=example,DC=com"
'recipname is something like "jamessmith"

Dim objPerson As New CDO.Person
Dim objMailRecip As CDOEXM.IMailRecipient
Dim i

objPerson.DataSource.Open "LDAP://" + ServerName + _
                          "/CN=" + recipname + _
                          ",CN=users," + DomainName


'Capitalized proxy type for proxies(1) makes it the primary (reply) address.
'the others are receive only.
Dim proxies(3) As Variant
proxies(0) = "smtp:user@somewhere.example.com"
proxies(1) = "SMTP:user@somewhere.example.com"
proxies(2) = "x400:c=us;a= ;p=Domain;o=First Organization;s=user;"

Set objMailRecip = objPerson
objMailRecip.ProxyAddresses = proxies


objPerson.DataSource.Save
MsgBox "Proxy addresses for " + recipname + " set successfully"

End Sub

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.