Skip to content

Commit

Permalink
�add test rcptToWithParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ghdcksgml1 authored and marcelmay committed Nov 27, 2024
1 parent 95e5cce commit bb55819
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,18 @@ public void mailSenderAUTHSuffix() throws IOException, MessagingException {
}
}


@Test
public void rcptToWithParameter() throws IOException, MessagingException {
Session smtpSession = greenMail.getSmtp().createSession();

try (SMTPTransport smtpTransport = new SMTPTransport(smtpSession, smtpURL)) {
Socket smtpSocket = new Socket(hostAddress, port); // Closed by transport
smtpTransport.connect(smtpSocket);
assertThat(smtpTransport.isConnected()).isTrue();
smtpTransport.issueCommand("MAIL FROM: <[email protected]>", -1);
smtpTransport.issueCommand("RCPT TO: <test@localhost> NOTIFY=SUCCESS,FAILURE", -1);
assertThat(smtpTransport.getLastServerResponse()).isEqualToNormalizingWhitespace("250 OK");
}
}
}

0 comments on commit bb55819

Please sign in to comment.