Question:
After I load an email (a eml file) by using CkMailMan, how I am going to replace the "Sender" header field value?
CkMailMan mailman;
mailman.UnlockComponent("Anything for 30-day trial");
CkEmail* pemail=NULL;
pemail=mailman.LoadEml((LPCTSTR) emlfile);
//I could not find a sender field property or method in CkEmail.
Answer:
Normallly, when you create a new email and send it, there is no "Sender" header. The sender is specified in the "From" header field. The From property handles this header field.
However, assuming you downloaded an email from a POP3 or IMAP server containing a "Sender" header field and you want to modify it, you can do so by calling AddHeaderField.
The AddHeaderField will add a new header field, or replace the header field if it already exists:
CkMailMan mailman;
mailman.UnlockComponent("Anything for 30-day trial");
CkEmail* pemail=NULL;
pemail=mailman.LoadEml((LPCTSTR) emlfile);
<strong>pemail->AddHeaderField("Sender","admin@chilkatsoft.com");</strong>