-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BCC not removed from JMAP EmailSubmissions (fixes #618)
- Loading branch information
Showing
3 changed files
with
32 additions
and
9 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
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 |
---|---|---|
|
@@ -194,8 +194,13 @@ pub async fn test(params: &mut JMAPTest) { | |
)); | ||
|
||
// Submit a valid message submission | ||
let email_body = | ||
"From: [email protected]\r\nTo: [email protected]\r\nSubject: hey\r\n\r\ntest"; | ||
let email_body = concat!( | ||
"From: [email protected]\r\n", | ||
"To: [email protected]\r\n", | ||
"Bcc: [email protected]\r\n", | ||
"Subject: hey\r\n\r\n", | ||
"test" | ||
); | ||
let email_id = client | ||
.email_import( | ||
email_body.as_bytes().to_vec(), | ||
|
@@ -212,12 +217,13 @@ pub async fn test(params: &mut JMAPTest) { | |
.unwrap(); | ||
|
||
// Confirm that the message has been delivered | ||
let email_body = email_body.replace("Bcc: [email protected]\r\n", ""); | ||
assert_message_delivery( | ||
&mut smtp_rx, | ||
MockMessage::new( | ||
"<[email protected]>", | ||
["<[email protected]>"], | ||
email_body, | ||
["<[email protected]>", "<[email protected]>"], | ||
&email_body, | ||
), | ||
) | ||
.await; | ||
|
@@ -253,7 +259,7 @@ pub async fn test(params: &mut JMAPTest) { | |
.contains(&rcpt_to.as_str())); | ||
|
||
assert!( | ||
message.message.contains(email_body), | ||
message.message.contains(&email_body), | ||
"Got [{}], Expected[{}]", | ||
message.message, | ||
email_body | ||
|
@@ -304,7 +310,7 @@ pub async fn test(params: &mut JMAPTest) { | |
.take_id(); | ||
assert_message_delivery( | ||
&mut smtp_rx, | ||
MockMessage::new("<[email protected]>", ["<[email protected]>"], email_body), | ||
MockMessage::new("<[email protected]>", ["<[email protected]>"], &email_body), | ||
) | ||
.await; | ||
expect_nothing(&mut smtp_rx).await; | ||
|
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