[geary/mjog/1079-mesage-id-from] Geary.Smtp.ClientService: Get default Message-Id domain from From
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/1079-mesage-id-from] Geary.Smtp.ClientService: Get default Message-Id domain from From
- Date: Wed, 27 Jan 2021 12:56:16 +0000 (UTC)
commit bc7ec8dd2e37c14193f1fb4bcb8050566601dbb5
Author: Michael Gratton <mike vee net>
Date: Wed Jan 27 23:51:35 2021 +1100
Geary.Smtp.ClientService: Get default Message-Id domain from From
Use From header as the default message id domain part, not Sender.
Fixes #1079
src/engine/smtp/smtp-client-service.vala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/smtp/smtp-client-service.vala b/src/engine/smtp/smtp-client-service.vala
index fa86226c8..49c09cfa1 100644
--- a/src/engine/smtp/smtp-client-service.vala
+++ b/src/engine/smtp/smtp-client-service.vala
@@ -121,9 +121,10 @@ public class Geary.Smtp.ClientService : Geary.ClientService {
debug("Saving composed email: %s", email_subject(composed));
// XXX work out what our public IP address is somehow and use
- // that in preference to the sender's domain
- string domain = composed.sender != null
- ? composed.sender.domain
+ // that in preference to the originator's domain
+ var from = composed.from;
+ var domain = from != null && !from.is_empty
+ ? from[0].domain
: this.account.primary_mailbox.domain;
Geary.RFC822.Message rfc822 =
yield new Geary.RFC822.Message.from_composed_email(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]