Package com.gitblit.models

Examples of com.gitblit.models.Mailing


    ticket = service.updateTicket(getRepository(), ticket.number, merge);
    ticket.repository = getRepository().name;

    TicketNotifier notifier = service.createNotifier();
    Mailing mailing = notifier.queueMailing(ticket);
    assertNotNull(mailing);
  }
View Full Code Here


      html.append("</head>");
      html.append("<body>");
      html.append(MarkdownUtils.transformGFM(settings, markdown, ticket.repository));
      html.append("</body>");

      Mailing mailing = Mailing.newHtml();
      mailing.from = getUserModel(ticket.updatedBy == null ? ticket.createdBy : ticket.updatedBy).getDisplayName();
      mailing.subject = getSubject(ticket);
      mailing.content = html.toString();
      mailing.id = "ticket." + ticket.number + "." + StringUtils.getSHA1(ticket.repository + ticket.number);
View Full Code Here

   * @param subject
   * @param message
   */
  @Override
  public void sendMailToAdministrators(String subject, String message) {
    Mailing mail = Mailing.newPlain();
    mail.subject = subject;
    mail.content = message;
    mail.setRecipients(settings.getStrings(Keys.mail.adminAddresses));
    send(mail);
  }
View Full Code Here

   * @param message
   * @param toAddresses
   */
  @Override
  public void sendMail(String subject, String message, Collection<String> toAddresses) {
    Mailing mail = Mailing.newPlain();
    mail.subject = subject;
    mail.content = message;
    mail.setRecipients(toAddresses);
    send(mail);
  }
View Full Code Here

   * @param message
   * @param toAddresses
   */
  @Override
  public void sendHtmlMail(String subject, String message, Collection<String> toAddresses) {
    Mailing mail = Mailing.newHtml();
    mail.subject = subject;
    mail.content = message;
    mail.setRecipients(toAddresses);
    send(mail);
  }
View Full Code Here

  private boolean sendEmail(UserModel user, X509Metadata metadata, File zip) {
    // send email
    try {
      if (mail.isReady()) {
        Mailing mailing = Mailing.newPlain();
        mailing.subject = "Your Gitblit client certificate for " + metadata.serverHostname;
        mailing.setRecipients(user.emailAddress);
        String body = X509Utils.processTemplate(new File(folder, X509Utils.CERTS + File.separator + "mail.tmpl"), metadata);
        if (StringUtils.isEmpty(body)) {
          body = MessageFormat.format("Hi {0}\n\nHere is your client certificate bundle.\nInside the zip file are installation instructions.", user.getDisplayName());
        }
        mailing.content = body;
        mailing.addAttachment(zip);

        Message message = mail.createMessage(mailing);

        mail.sendNow(message);
        return true;
View Full Code Here

   * @param subject
   * @param message
   */
  @Override
  public void sendMailToAdministrators(String subject, String message) {
    Mailing mail = Mailing.newPlain();
    mail.subject = subject;
    mail.content = message;
    mail.setRecipients(settings.getStrings(Keys.mail.adminAddresses));
    send(mail);
  }
View Full Code Here

   * @param message
   * @param toAddresses
   */
  @Override
  public void sendMail(String subject, String message, Collection<String> toAddresses) {
    Mailing mail = Mailing.newPlain();
    mail.subject = subject;
    mail.content = message;
    mail.setRecipients(toAddresses);
    send(mail);
  }
View Full Code Here

   * @param message
   * @param toAddresses
   */
  @Override
  public void sendHtmlMail(String subject, String message, Collection<String> toAddresses) {
    Mailing mail = Mailing.newHtml();
    mail.subject = subject;
    mail.content = message;
    mail.setRecipients(toAddresses);
    send(mail);
  }
View Full Code Here

      html.append("</head>");
      html.append("<body>");
      html.append(MarkdownUtils.transformGFM(settings, markdown, ticket.repository));
      html.append("</body>");

      Mailing mailing = Mailing.newHtml();
      mailing.from = getUserModel(ticket.updatedBy == null ? ticket.createdBy : ticket.updatedBy).getDisplayName();
      mailing.subject = getSubject(ticket);
      mailing.content = html.toString();
      mailing.id = "ticket." + ticket.number + "." + StringUtils.getSHA1(ticket.repository + ticket.number);
View Full Code Here

TOP

Related Classes of com.gitblit.models.Mailing

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.