Package org.sonar.plugins.emailnotifications.api

Examples of org.sonar.plugins.emailnotifications.api.EmailMessage


  }

  @Test
  public void shouldSendNonThreadedEmail() throws Exception {
    configure();
    EmailMessage emailMessage = new EmailMessage()
      .setTo("user@nowhere")
      .setSubject("Foo")
      .setMessage("Bar");
    channel.deliver(emailMessage);
View Full Code Here


  @Test
  public void shouldNotThrowAnExceptionWhenUnableToSendEmail() throws Exception {
    configure();
    server.stop();

    EmailMessage emailMessage = new EmailMessage()
      .setTo("user@nowhere")
      .setSubject("Foo")
      .setMessage("Bar");
    channel.deliver(emailMessage);
  }
View Full Code Here

    }
    sb.append('\n');

    appendFooter(sb, notification);

    return new EmailMessage()
      .setMessageId("new-issues/" + notification.getFieldValue(FIELD_PROJECT_KEY))
      .setSubject(projectName + ": new issues")
      .setMessage(sb.toString());
  }
View Full Code Here

    String projectName = notif.getFieldValue("projectName");
    String issueKey = notif.getFieldValue("key");
    String author = notif.getFieldValue("changeAuthor");

    EmailMessage message = new EmailMessage()
      .setMessageId("issue-changes/" + issueKey)
      .setSubject(projectName + ", change on issue #" + issueKey)
      .setMessage(sb.toString());
    if (author != null) {
      message.setFrom(getUserFullName(author));
    }
    return message;
  }
View Full Code Here

TOP

Related Classes of org.sonar.plugins.emailnotifications.api.EmailMessage

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.