Package com.amazonaws.services.simpleemail.model

Examples of com.amazonaws.services.simpleemail.model.Message


        Destination dest = new Destination().withToAddresses(toAddresses);
        request.setDestination(dest);

        Content subjContent = new Content().withData(subject);
        Message msg = new Message().withSubject(subjContent);

        // Include a body in both text and HTML formats
        Body theBody = new Body();
        if (textBody != null) {
            theBody.withText(new Content().withData(textBody));
        }
        if (htmlBody != null) {
            theBody.withHtml(new Content().withData(htmlBody));
        }
        msg.setBody(theBody);

        request.setMessage(msg);

        // Call Amazon SES to send the message
        String messageId = null;
View Full Code Here


        Content subject = new Content().withData(SUBJECT);
        Content textBody = new Content().withData(BODY);
        Body body = new Body().withText(textBody);

        // Create a message with the specified subject and body.
        Message message = new Message().withSubject(subject).withBody(body);

        // Assemble the email.
        SendEmailRequest request = new SendEmailRequest().withSource(FROM).withDestination(destination).withMessage(message);

        try {
View Full Code Here

                .withCcAddresses(getCcAddresses(to));
        Content subjectContent = new Content(subject);
        Content bodyContent = new Content();
        Body msgBody = new Body(bodyContent);
        msgBody.setHtml(new Content(body));
        Message msg = new Message(subjectContent, msgBody);
        String sourceAddress = getSourceAddress(to);
        SendEmailRequest request = new SendEmailRequest(sourceAddress, destination, msg);
        request.setReturnPath(sourceAddress);
        LOGGER.debug(String.format("Sending email with subject '%s' to %s",
                subject, to));
View Full Code Here

      final SendEmailRequest request = new SendEmailRequest().withSource(Config.SUPPORT_EMAIL);
      Destination dest = new Destination().withToAddresses(emails);
      request.setDestination(dest);

      Content subjContent = new Content().withData(subject);
      Message msg = new Message().withSubject(subjContent);

      // Include a body in both text and HTML formats
      Content textContent = new Content().withData(body);
      msg.setBody(new Body().withText(textContent));

      request.setMessage(msg);

      Utils.asyncExecute(new Runnable() {
        public void run() {
View Full Code Here

        final Destination destination = new Destination(Lists.newArrayList(recipient));

        final Content subjectContent = new Content(subject);
        final Content bodyContent = new Content(body);
        final Body msgBody = new Body(bodyContent);
        final Message msg = new Message(subjectContent, msgBody);

        final SendEmailRequest request = new SendEmailRequest(sender, destination, msg);

        return sesClient.sendEmail(request);
    }
View Full Code Here

      final SendEmailRequest request = new SendEmailRequest().withSource(Config.SUPPORT_EMAIL);
      Destination dest = new Destination().withToAddresses(emails);
      request.setDestination(dest);

      Content subjContent = new Content().withData(subject);
      Message msg = new Message().withSubject(subjContent);

      // Include a body in both text and HTML formats
      Content textContent = new Content().withData(body);
      msg.setBody(new Body().withText(textContent));

      request.setMessage(msg);

      Utils.asyncExecute(new Callable<Object>() {
        public Object call() throws Exception {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpleemail.model.Message

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.