Add normal, carbon copy or blind carbon copy recipient to current email.
[Syntax]
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
C#: long AddRecipient( string strName, string strAddress, long Flags )
strName
Friendly name of the recipient.
strAddress
Email address of the recipient.
Flags
| Value | Meaning |
| 0 | Normal recipient |
| 1 | Carbon copy recipient |
| 2 | Blind carbon copy recipient |
Return Values
Return zero if successful, or return non-zero if failed.
Usage Example:
[Visual Basic]Dim oSmtp As AOSMTPLib.Mail Set oSmtp = New AOSMTPLib.Mail oSmtp.AddRecipient "Dennis", "dennis@msn.com", 0 'normal recipient oSmtp.AddRecipient "Support Team", "support@adminsystem.net", 1 'cc oSmtp.AddRecipient "BCC ", "info@adminsystem.net", 2 'bcc[ASP.NET/C#]
<%@ Page language="C#" AutoEventWireup="true" aspcompat=true%>
<%@ Import Namespace="AOSMTPLib"%>
<%
private void Page_Load( object sender, System.EventArgs e )
{
AOSMTPLib.MailClass oSmtp = new AOSMTPLib.MailClass();
oSmtp.AddRecipient( "Dennis", "dennis@msn.com", 0 ) //normal recipient
oSmtp.AddRecipient( "Support Team", "support@adminsystem.net", 1 )//cc
oSmtp.AddRecipient( "BCC ", "info@adminsystem.net", 2 )//bcc
}
%>
See Also
2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.