Platform SDK: Exchange 2000 Server

ProxyAddresses Property

[This is preliminary documentation and subject to change.]

This property is a list of proxy addresses for the recipient.

[Visual Basic,VBScript]
Public Property ProxyAddresses as Variant
[C++]
HRESULT get_ProxyAddresses(VARIANT* Val));
HRESULT put_ProxyAddresses(VARIANT Val));
[IDL]
HRESULT [propget] ProxyAddresses([out,retval] VARIANT* Val));
HRESULT [propput] ProxyAddresses([in] VARIANT Val));

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 (e.g. “smtp:”, “x400:”).

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

smtp:proxy1@somewhere.microsoft.com

SMTP:proxy2@somewhere.microsoft.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=microsoft,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 recieve only.
    Dim proxies(3) As Variant
    proxies(0) = "smtp:user@somewhere.microsoft.com"
    proxies(1) = "SMTP:user@somewhere.microsoft.com"
    proxies(2) = "x400:c=us;a= ;p=Domain;o=First Organization;s=user;"
        
    Set objMailRecip = objPerson
    objMailRecip.ProxyAddresses = proxies
    
    'look at the results
    Debug.Print Chr(13) + Chr(13) + Chr(13) + Chr(13) + Chr(13) 'add some space
    For i = LBound(objMailRecip.ProxyAddresses) To UBound(objMailRecip.ProxyAddresses)
      Debug.Print objMailRecip.ProxyAddresses(i)
    Next
        
    objPerson.DataSource.Save
    MsgBox "Proxy addresses for " + recipname + " set successfully"
    
End Sub