diff --git a/src/commands/committee.rs b/src/commands/committee.rs index 3de0ec9..487171b 100644 --- a/src/commands/committee.rs +++ b/src/commands/committee.rs @@ -172,7 +172,7 @@ pub mod link { let creds = Credentials::new(config.mail_user.clone(), config.mail_pass.clone()); // Open a remote connection to gmail using STARTTLS - let mailer = SmtpTransport::starttls_relay(&config.mail_smtp).unwrap().credentials(creds).build(); + let mailer = SmtpTransport::starttls_relay(&config.mail_smtp)?.credentials(creds).build(); // Send the email mailer.send(&email) diff --git a/src/commands/link_email.rs b/src/commands/link_email.rs index 2a0d744..e597ea3 100644 --- a/src/commands/link_email.rs +++ b/src/commands/link_email.rs @@ -184,7 +184,7 @@ pub mod link { let creds = Credentials::new(config.mail_user.clone(), config.mail_pass.clone()); // Open a remote connection to gmail using STARTTLS - let mailer = SmtpTransport::starttls_relay(&config.mail_smtp).unwrap().credentials(creds).build(); + let mailer = SmtpTransport::starttls_relay(&config.mail_smtp)?.credentials(creds).build(); // Send the email mailer.send(&email)