AddRecipient Method

Add normal, carbon copy or blind carbon copy recipient to current email.

Visual C++: HRESULT AddRecipient(BSTR strName, BSTR strAddress, long Flags, long* pVal)
Visual Basic AddRecipient(strName As String, strAddress As String, Flags As Long) As Long



Friendly name of the recipient.


Email address of the recipient.


Value Meaning
0 Normal recipient(To)
1 Carbon copy recipient(Cc)
2 Blind carbon copy recipient(Bcc)

Return Values

Return zero if successful, or return non-zero if failed.

Usage Example:

[Visual Basic]
Dim oSmtp As EASendMailObjLib.Mail
Set oSmtp = New EASendMailObjLib.Mail

' for evaluation usage, please use "TryIt" as the license code.
oSmtp.LicenseCode = "TryIt"

oSmtp.AddRecipient "Dennis", "", 0   'normal recipient
oSmtp.AddRecipient "Support Team", "", 1 'cc
oSmtp.AddRecipient "BCC ", "", 2 'bcc

See Also

ClearRecipient Method