use of com.gitblit.FileSettings in project gitblit by gitblit.
the class MailTest method testSendMail.
@Test
public void testSendMail() throws Exception {
FileSettings settings = new FileSettings("mailtest.properties");
MailService mail = new MailService(settings);
Mailing mailing = Mailing.newPlain();
mailing.setRecipients(settings.getStrings(Keys.mail.adminAddresses));
Message message = mail.createMessage(mailing);
message.setSubject("Test");
message.setText("Lägger till andra stycket i ny fil. UTF-8 encoded");
mail.queue(message);
mail.run();
assertTrue("mail queue is not empty!", mail.hasEmptyQueue());
}
Aggregations