mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Added identity display name and default bcc
This commit is contained in:
@@ -1698,9 +1698,20 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
// Create message
|
||||
MimeMessage imessage = MessageHelper.from(this, message, isession);
|
||||
|
||||
// Add reply to
|
||||
if (ident.replyto != null)
|
||||
imessage.setReplyTo(new Address[]{new InternetAddress(ident.replyto)});
|
||||
|
||||
// Add bcc
|
||||
if (ident.bcc != null) {
|
||||
List<Address> bcc = new ArrayList<>();
|
||||
Address[] existing = imessage.getRecipients(Message.RecipientType.BCC);
|
||||
if (existing != null)
|
||||
bcc.addAll(Arrays.asList(existing));
|
||||
bcc.add(new InternetAddress(ident.bcc));
|
||||
imessage.setRecipients(Message.RecipientType.BCC, bcc.toArray(new Address[0]));
|
||||
}
|
||||
|
||||
// defacto standard
|
||||
if (ident.delivery_receipt)
|
||||
imessage.addHeader("Return-Receipt-To", ident.replyto == null ? ident.email : ident.replyto);
|
||||
|
||||
Reference in New Issue
Block a user