Probleme mit MapiRecipDesc
-
Hi@all,
habe folgendes Problem, ich setze mehrere Empfänger: Normal, als CC oder BCC,
wenn ich jetzt aber für eines der Felder(CC etc.) meherer Empfänger setze zeigt er mir im Client aber nur einen an und versendet auch nur an den einen.Hier ist der Code
MailBody.nRecipCount = dlgMail->GetMailAdds()->GetSize() + dlgMail->GetMailCC()->GetSize() + dlgMail->GetMailBCC()->GetSize(); MailBody.lpRecips = new MapiRecipDesc[MailBody.nRecipCount]; int nRecipIndex = 0; for(int x = 0; x < dlgMail->GetMailAdds()->GetSize(); x++) { MapiRecipDesc& recip = MailBody.lpRecips[nRecipIndex]; ZeroMemory(&recip, sizeof(MapiRecipDesc)); CString& strAddress = dlgMail->GetMailAdds()->ElementAt(x); recip.ulRecipClass = MAPI_TO; recip.lpszName = (LPTSTR)(LPCTSTR)strAddress; recip.lpszAddress = recip.lpszName; nRecipIndex++; } for(int cc = 0; cc < dlgMail->GetMailCC()->GetSize(); cc++) { MapiRecipDesc& recip = MailBody.lpRecips[nRecipIndex]; ZeroMemory(&recip, sizeof(MapiRecipDesc)); CString& strAddress = dlgMail->GetMailCC()->ElementAt(cc); recip.ulRecipClass = MAPI_CC; recip.lpszName = (LPTSTR)(LPCTSTR)strAddress; recip.lpszAddress = recip.lpszName; nRecipIndex++; } for(int bcc = 0; bcc < dlgMail->GetMailBCC()->GetSize(); bcc++) { MapiRecipDesc& recip = MailBody.lpRecips[nRecipIndex]; ZeroMemory(&recip, sizeof(MapiRecipDesc)); CString& strAddress = dlgMail->GetMailBCC()->ElementAt(bcc); recip.ulRecipClass = MAPI_BCC; recip.lpszName = (LPTSTR)(LPCTSTR)strAddress; recip.lpszAddress = recip.lpszName; nRecipIndex++; }
Wo mach ich denn hier meinen Fehler?
Gruß CrazyPlaya