-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68e999c
commit 66f7d76
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,9 +80,9 @@ impl Serialize for SingleEmail { | |
/// The main function: checks email format, checks MX records, and checks SMTP | ||
/// responses to the email inbox. | ||
pub fn email_exists(to_email: &str, from_email: &str) -> SingleEmail { | ||
let from_email = EmailAddress::from_str(from_email).unwrap_or( | ||
EmailAddress::from_str("[email protected]").expect("This is a valid email. qed."), | ||
); | ||
let from_email = EmailAddress::from_str(from_email).unwrap_or_else(|_| { | ||
EmailAddress::from_str("[email protected]").expect("This is a valid email. qed.") | ||
}); | ||
|
||
debug!("Checking email '{}'", to_email); | ||
let my_syntax = match address_syntax(to_email) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters