Added BCC field
This commit is contained in:
parent
3d1857de3a
commit
110da9ced6
|
@ -158,7 +158,7 @@ open class EmailsFetcher(
|
||||||
|
|
||||||
val email = Email(
|
val email = Email(
|
||||||
sender, message.subject ?: "", map(message.sentDate ?: message.receivedDate),
|
sender, message.subject ?: "", map(message.sentDate ?: message.receivedDate),
|
||||||
message.getRecipients(Message.RecipientType.TO).orEmpty().map { map(it) }, message.getRecipients(Message.RecipientType.CC).orEmpty().map { map(it) },
|
message.getRecipients(Message.RecipientType.TO).orEmpty().map { map(it) }, message.getRecipients(Message.RecipientType.CC).orEmpty().map { map(it) }, message.getRecipients(Message.RecipientType.BCC).orEmpty().map { map(it) },
|
||||||
(message.replyTo?.firstOrNull() as? InternetAddress)?.let { if (it.address != sender?.address) map(it) else null }, // only set replyTo if it differs from sender
|
(message.replyTo?.firstOrNull() as? InternetAddress)?.let { if (it.address != sender?.address) map(it) else null }, // only set replyTo if it differs from sender
|
||||||
status.folder.getUID(message),
|
status.folder.getUID(message),
|
||||||
parts.any { it.mediaType == "application/pgp-encrypted" },
|
parts.any { it.mediaType == "application/pgp-encrypted" },
|
||||||
|
|
|
@ -8,7 +8,8 @@ class Email(
|
||||||
val subject: String,
|
val subject: String,
|
||||||
val date: Instant,
|
val date: Instant,
|
||||||
val to: List<EmailAddress>,
|
val to: List<EmailAddress>,
|
||||||
val cc: List<EmailAddress>,
|
val cc: List<EmailAddress> = emptyList(),
|
||||||
|
val bcc: List<EmailAddress> = emptyList(),
|
||||||
val replayTo: EmailAddress? = null,
|
val replayTo: EmailAddress? = null,
|
||||||
val messageId: Long,
|
val messageId: Long,
|
||||||
val isEncrypted: Boolean = false,
|
val isEncrypted: Boolean = false,
|
||||||
|
|
Loading…
Reference in New Issue