wodSmtpServer ActiveX Control - ExpandAddress Method
      
 

Description

Called when user wants to expand an address or an alias


Return Type

None  


Syntax

object.ExpandAddress Owner, User, Address, Response



The ExpandAddress Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSmtpNotify.
Owner Required. A wodSmtpServer object. Reference to wodSmtpServerCom instance that called this callback method.
User Required. A SmtpUser object. Request to the user who wants to get expanded form of an address.
Address Required. A String value.

Email address or account name user is interested to.

Response Required. A Variant value. Response you will send to the user.

Remarks

NOTE: This method is called only if you implemented IwodSmtpNotify interface in your application, and wodSmtpServer1.Notification property has received reference to instance of your implementation.

Some SMTP servers allow 'EXPN' command so that clients can determine additional information about some account name or email address. For example, client knows that your server have user 'joe', but doesn't really know who he is. For this purpose, they can connect to server and issue 'EXPN joe' command. If you are willing to provide information about account joe, you can set Response variable to Joe's name and email address, so they know in future what's real name for user Joe.

If you do want to provide such information, you can do it like this:

Private Sub INotifications_ExpandAddress(ByVal Owner As WODSMTPSERVERCOMLib.IwodSmtpServerCom, ByVal User As WODSMTPSERVERCOMLib.ISmtpUser, ByVal Address As String, Response As Variant)
    Response = "Ozzie WeOnlyDo! <ozzie>"
End Sub
 

As you can see, all you need to send is one line that includes user's real name, and his email inside <> characters (this is by convention). However, if there are several users 'hiding' behind one email address (for instance, some sort of mailing list), you can provide more than one line of response information. In such cases, just divide them with CRLF sequence.