Get total count of normal recipients.
[Syntax] C++: HRESULT GetRecipientCount( long* pVal ) Visual Basic: GetRecipientCount() As long C#: long GetRecipientCount()
Return Value
This method returns the total count of normal recipients.
Usage Example
[C#]
public void ParseAllRecipients( string emailFile )
{
POPMSGClass oMsg = new POPMSGClass();
int nRet = 0, nCount = 0, i = 0;
string name = "", address = "";
try
{
if( oMsg.ImportFile( emailFile ) != 0 )
throw new Exception( "error with ImportFile" );
nCount = oMsg.GetRecipientCount(); //Parse normal recipients
for( i = 1; i <= nCount; i++ )
{
name = oMsg.GetRecipientName(i);
address = oMsg.GetRecipientAddr(i); //Parse carbon copy recipients
}
nCount = oMsg.GetCCCount();
for( i = 1; i <= nCount; i++ )
{
name = oMsg.GetCCName(i);
address = oMsg.GetCCAddr(i);
}
}
catch( Exception e )
{
Console.WriteLine( e.Message );
}
oMsg = null;
}
See Also
GetRecipientAddr Method
GetRecipientName Method
GetCCAddr Method
GetCCName Method
GetCCCount Method
2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.