MailMill COM 1.0 Documentation

CreateEmailAddress Mail Method:
Helper function that builds a full email address from a display name and an email address.
Syntax:
[C++]
HRESULT CreateEmailAddress(BSTR name, BSTR email, BSTR *pstrEmailAddress);
[VB]
Function CreateEmailAddress(name As String, email As String) As String
Parameters:
name
Display name part of the email address.
email
Email address, must be a valid RFC2821 address.
Remark:
A full email address is similar to what is defined in the RFC2822 as mailbox, except that the display name part supports unicode characters. CreateEmailAddress allows you to create valid full email address, even if the display name contains special chars like spaces, ", \, <, >, etc. If the display name is empty or contains only spaces, the email parameter is returned.
Example:
[VB]
Dim oMail As New Mail
oMail.From = CreateEmailAddress("Sales Department", "sales@emilltest.com")
' oMail.From now contains "Sales Department" <sales@emilltest.com>
See also:
MailMill Component | Mail Object

 

Copyright © Active+ Software 2005 - All rights reserved