Get specified CC recipient's friendly name.
[Syntax] C++: HRESULT GetCCName( int nCount, BSTR* pVal ) Visual Basic: GetCCName( nCount As Integer ) As String C#: string GetCCName()
Parameters
nCount
Ordinal number of CC recipient. The minimum value is 1, the maximum value is returned by method GetCCCount.
Return Value
This method returns specified CC recipient's friendly name.
Remarks
If CC recipient has not a friendly name, this method returns CC recipient's email address.
Usage Example
[Visual C++]
#include <comdef.h>
#include <string>
#include <iostream>
using namespace std;
#import "c:\program files\adminsystem.net\anpop\anpop.dll" no_namespace
void ParseAllRecipients( LPCSTR emailFile )
{
::CoInitialize( NULL );
int i = 0, nRet = 0, nCount = 0
_bstr_t name = "", address = "";
IPOPMSGPtr oMsg("ANPOP.POPMSG");
try
{
nRet = oMsg->ImportFile( emailFile );
if( nRet != 0 )
throw string( "error with ImportFile" );
nCount = oMsg->GetRecipientCount(); //Parse normal recipients
for( i = 1; i <= nCount; i++ )
{
name = oMsg->GetRecipientName(i);
address = GetRecipientAddr(i);
}
nCount = oMsg->GetCCCount(); //Parse carbon copy recipients
for( i = 1; i <= nCount; i++ )
{
name = oMsg->GetCCName(i);
address = GetCCAddr(i);
}
}
catch( string &e )
{
cout << e << endl;
}
oMsg.Release();
::CoUninitialize();
}
See Also
GetCCCount Method
GetCCAddr Method
GetRecipientAddr Method
GetRecipientCount Method
GetRecipientName Method
2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.