Package com.gitblit.service

Examples of com.gitblit.service.MailService


  private final MailService mailService;

  public NotificationManager(IStoredSettings settings) {
    this.settings = settings;
    this.mailService = new MailService(settings);
  }
View Full Code Here


    File file = new File(folder, "gitblit.properties");
    if (!file.exists()) {
      return null;
    }
    gitblitSettings = new FileSettings(file.getAbsolutePath());
    mail = new MailService(gitblitSettings);
    String us = gitblitSettings.getString(Keys.realm.userService, "${baseFolder}/users.conf");
    String ext = us.substring(us.lastIndexOf(".") + 1).toLowerCase();
    IUserService service = null;
    if (!ext.equals("conf") && !ext.equals("properties") && ext.contains("userservice")) {
      String realm = ext.substring(0, ext.indexOf("userservice"));
View Full Code Here

  private final MailService mailService;

  public NotificationManager(IStoredSettings settings) {
    this.settings = settings;
    this.mailService = new MailService(settings);
  }
View Full Code Here

public class MailTest extends GitblitUnitTest {

  @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());
  }
View Full Code Here

TOP

Related Classes of com.gitblit.service.MailService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.