Ooops....
This commit is contained in:
parent
97a6f9e9e9
commit
e857f2ed2a
1 changed files with 1 additions and 33 deletions
|
@ -57,7 +57,7 @@ public class EmailSenderTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void sendMail() throws AddressException, MessagingException, IOException {
|
public void sendMail() throws MessagingException, IOException {
|
||||||
emailSender.send("test@test.com", "Test subject", "Test body");
|
emailSender.send("test@test.com", "Test subject", "Test body");
|
||||||
|
|
||||||
MimeMessage[] receivedMessages = greenMail.getReceivedMessages();
|
MimeMessage[] receivedMessages = greenMail.getReceivedMessages();
|
||||||
|
@ -70,36 +70,4 @@ public class EmailSenderTest {
|
||||||
Assert.assertEquals("Test body", ((String) msg.getContent()).trim());
|
Assert.assertEquals("Test body", ((String) msg.getContent()).trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void googleTTLS() throws MessagingException, IOException {
|
|
||||||
HashMap<String,String> config = new HashMap<String, String>();
|
|
||||||
config.put("from", "stianst@gmail.com");
|
|
||||||
config.put("host", "smtp.gmail.com");
|
|
||||||
config.put("port", "587");
|
|
||||||
config.put("auth", "true");
|
|
||||||
config.put("user", "stianst@gmail.com");
|
|
||||||
config.put("password", "ahqsbktqbfhwmhrw");
|
|
||||||
config.put("starttls", "true");
|
|
||||||
|
|
||||||
emailSender = new EmailSender(config);
|
|
||||||
|
|
||||||
emailSender.send("stianst@gmail.com", "TTLS " + System.currentTimeMillis(), "Test body");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void googleSSL() throws MessagingException, IOException {
|
|
||||||
HashMap<String,String> config = new HashMap<String, String>();
|
|
||||||
config.put("from", "stianst@gmail.com");
|
|
||||||
config.put("host", "smtp.gmail.com");
|
|
||||||
config.put("port", "465");
|
|
||||||
config.put("auth", "true");
|
|
||||||
config.put("user", "stianst@gmail.com");
|
|
||||||
config.put("password", "ahqsbktqbfhwmhrw");
|
|
||||||
config.put("ssl", "true");
|
|
||||||
|
|
||||||
emailSender = new EmailSender(config);
|
|
||||||
|
|
||||||
emailSender.send("stianst@gmail.com", "SSL " + System.currentTimeMillis(), "Test body");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue