[geary/wip/336-smtp-rcpt-to-quoting: 3/3] Enforce correct formatting for SMTP MailRequest and RcptRequest
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/336-smtp-rcpt-to-quoting: 3/3] Enforce correct formatting for SMTP MailRequest and RcptRequest
- Date: Wed, 24 Apr 2019 10:48:28 +0000 (UTC)
commit 37da52e14f691d13f36fae6092301f08c3c26d85
Author: Michael Gratton <mike vee net>
Date: Wed Apr 24 20:46:45 2019 +1000
Enforce correct formatting for SMTP MailRequest and RcptRequest
src/engine/smtp/smtp-client-session.vala | 2 +-
src/engine/smtp/smtp-request.vala | 11 +----------
2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/src/engine/smtp/smtp-client-session.vala b/src/engine/smtp/smtp-client-session.vala
index d8d2d182..86300d81 100644
--- a/src/engine/smtp/smtp-client-session.vala
+++ b/src/engine/smtp/smtp-client-session.vala
@@ -217,7 +217,7 @@ public class Geary.Smtp.ClientSession {
// TODO: Support mailbox groups
foreach (RFC822.MailboxAddress mailbox in addrlist) {
- RcptRequest rcpt_request = new RcptRequest.plain(mailbox.to_rfc822_address());
+ RcptRequest rcpt_request = new RcptRequest(mailbox);
Response response = yield cx.transaction_async(rcpt_request, cancellable);
if (!response.code.is_success_completed()) {
diff --git a/src/engine/smtp/smtp-request.vala b/src/engine/smtp/smtp-request.vala
index cf09b9b7..c5f570f6 100644
--- a/src/engine/smtp/smtp-request.vala
+++ b/src/engine/smtp/smtp-request.vala
@@ -60,19 +60,10 @@ public class Geary.Smtp.MailRequest : Geary.Smtp.Request {
public MailRequest(Geary.RFC822.MailboxAddress reverse_path) {
base (Command.MAIL, { "from:<%s>".printf(reverse_path.to_rfc822_address()) });
}
-
- public MailRequest.plain(string addr) {
- base (Command.MAIL, { "from:<%s>".printf(addr) });
- }
}
public class Geary.Smtp.RcptRequest : Geary.Smtp.Request {
public RcptRequest(Geary.RFC822.MailboxAddress to) {
- base (Command.RCPT, { "to:%s".printf(to.to_address_display("<", ">")) });
- }
-
- public RcptRequest.plain(string addr) {
- base (Command.RCPT, { "to:<%s>".printf(addr) });
+ base (Command.RCPT, { "to:<%s>".printf(to.to_rfc822_address()) });
}
}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]