ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp
branchRCL_3
changeset 8 e1b6206813b4
parent 4 e7aa27f58ae1
child 13 8592a65ad3fb
equal deleted inserted replaced
4:e7aa27f58ae1 8:e1b6206813b4
   194     const RPointerArray<CFSMailAddress>& ccArray 
   194     const RPointerArray<CFSMailAddress>& ccArray 
   195         = aMessage.GetCCRecipients();
   195         = aMessage.GetCCRecipients();
   196     header->CcRecipients().Reset();
   196     header->CcRecipients().Reset();
   197     for( TInt i = 0; i < ccArray.Count(); i++ )
   197     for( TInt i = 0; i < ccArray.Count(); i++ )
   198         {
   198         {
   199         header->CcRecipients().AppendL( ccArray[i]->GetEmailAddress() ); // copy created
   199         TPtrC displayName = ccArray[i]->GetDisplayName();
       
   200         TPtrC emailName = ccArray[i]->GetEmailAddress();
       
   201         HBufC* fullName = CreateDisplayStringLC( displayName, emailName );  // << fullName
       
   202         header->CcRecipients().AppendL( *fullName );
       
   203         CleanupStack::PopAndDestroy( fullName );    // >>> fullName
   200         }
   204         }
   201     
   205     
   202     // BCC field
   206     // BCC field
   203     const RPointerArray<CFSMailAddress>& bccArray 
   207     const RPointerArray<CFSMailAddress>& bccArray 
   204         = aMessage.GetBCCRecipients();
   208         = aMessage.GetBCCRecipients();
   205     header->BccRecipients().Reset();
   209     header->BccRecipients().Reset();
   206     for( TInt i = 0; i < bccArray.Count(); i++ )
   210     for( TInt i = 0; i < bccArray.Count(); i++ )
   207         {
   211         {
   208         header->BccRecipients().AppendL( bccArray[i]->GetEmailAddress() ); // copy created
   212         TPtrC displayName = bccArray[i]->GetDisplayName();
       
   213         TPtrC emailName = bccArray[i]->GetEmailAddress();
       
   214         HBufC* fullName = CreateDisplayStringLC( displayName, emailName );  // << fullName
       
   215         header->BccRecipients().AppendL( *fullName ); // copy created
       
   216         CleanupStack::PopAndDestroy( fullName );    // >>> fullName
   209         }
   217         }
   210     
   218     
   211     // Subject, check null pointer
   219     // Subject, check null pointer
   212     if ( &aMessage.GetSubject() )
   220     if ( &aMessage.GetSubject() )
   213         {
   221         {