Delphi ActiveX Requires Chilkat v11.0.0+
Delphi ActiveX
Read To and Cc from a received message
See more Email Object Examples
Enumerate visible recipients by zero-based index. An address can have an empty display name. A delivered copy usually does not reveal recipients who were blind-copied.
Chilkat Delphi ActiveX Downloads
var
success: Integer;
email: TChilkatEmail;
i: Integer;
begin
success := 0;
// Assumes Chilkat is unlocked. See Global Unlock Sample.
email := TChilkatEmail.Create(Self);
success := email.LoadEml('message.eml');
if (success <> 1) then
begin
Memo1.Lines.Add(email.LastErrorText);
Exit;
end;
i := 0;
while (i < email.NumTo) do
begin
Memo1.Lines.Add('To: ' + email.GetToName(i) + ' ' + email.GetToAddr(i));
i := i + 1;
end;
i := 0;
while (i < email.NumCC) do
begin
Memo1.Lines.Add('Cc: ' + email.GetCcName(i) + ' ' + email.GetCcAddr(i));
i := i + 1;
end;