Hi,
I am using Aspose Email to version 19.2. There is a strange problem when sending mails containing Bcc.
When I send an E-Mail with bcc over Imap server, the other recipients of the E-Mail do not see this BCC field, which is the right behaviour.
WithoutBcc.PNG (2.3 KB)
But when I save my E-Mail in eml format and then send it, the other recipients are able to see that the E-Mail is also sent to the bcc recipient. It appears as “Blind Copy”. This totally defeats the purpose of Bcc. Please find the attached image of the mail received by other recipient.
WithBcc.PNG (2.7 KB)
The portion of code that I use for saving and loading the eml file before sending it via the SMTP server is:
message.setBodyEncoding(StandardCharsets.UTF_8);
EmlSaveOptions emlSaveOptions = new EmlSaveOptions(MailMessageSaveType.getEmlFormat());
emlSaveOptions.setFileCompatibilityMode(FileCompatibilityMode.PreserveTnefAttachments);
emlSaveOptions.setCheckBodyContentEncoding(true);
try (FileOutputStream output_stream = new FileOutputStream(eml_file)) {
message.save(output_stream, emlSaveOptions);
}
and
EmlLoadOptions loadOptions = new EmlLoadOptions();
loadOptions.setPrefferedTextEncoding(StandardCharsets.UTF_8);
MailMessage.load(mail_file.getAbsolutePath(), loadOptions);
I have attached the detailed test case.
AsposeSendMail.zip (6.8 KB)
Could you please investigate the issue?
best regards
Arne