Ooops....

This commit is contained in:
Stian Thorgersen 2013-11-05 12:43:11 +00:00
parent 97a6f9e9e9
commit e857f2ed2a

View file

@ -57,7 +57,7 @@ public class EmailSenderTest {
}
@Test
public void sendMail() throws AddressException, MessagingException, IOException {
public void sendMail() throws MessagingException, IOException {
emailSender.send("test@test.com", "Test subject", "Test body");
MimeMessage[] receivedMessages = greenMail.getReceivedMessages();
@ -70,36 +70,4 @@ public class EmailSenderTest {
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");
}
}