Commit 37da52e1 authored by Michael Gratton's avatar Michael Gratton 🤞

Enforce correct formatting for SMTP MailRequest and RcptRequest

parent 534b4e27
Pipeline #77757 passed with stages
in 35 minutes and 6 seconds
......@@ -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()) {
......
......@@ -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()) });
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment