/** * <p> * The destination for this email, composed of To:, CC:, and BCC: fields. * </p> * * @param destination * The destination for this email, composed of To:, CC:, and BCC: fields. * @return Returns a reference to this object so that method calls can be chained together. */ public SendEmailRequest withDestination(Destination destination) { setDestination(destination); return this; }
setDestination(destination); setMessage(message);
setDestination(destination); setMessage(message);
/** * <p> * The destination for this email, composed of To:, CC:, and BCC: fields. * </p> * * @param destination * The destination for this email, composed of To:, CC:, and BCC: fields. * @return Returns a reference to this object so that method calls can be chained together. */ public SendEmailRequest withDestination(Destination destination) { setDestination(destination); return this; }
setDestination(destination); setMessage(message);
@Override public boolean sendEmail(List<String> emails, String subject, String body) { if (emails != null && !emails.isEmpty() && !StringUtils.isBlank(body)) { 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).withCharset(Config.DEFAULT_ENCODING); msg.setBody(new Body().withHtml(textContent)); request.setMessage(msg); Para.asyncExecute(new Runnable() { public void run() { sesclient.sendEmail(request); } }); return true; } return false; } }
@Override public boolean sendEmail(List<String> emails, String subject, String body) { if (emails != null && !emails.isEmpty() && !StringUtils.isBlank(body)) { 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).withCharset(Config.DEFAULT_ENCODING); msg.setBody(new Body().withHtml(textContent)); request.setMessage(msg); Utils.asyncExecute(new Runnable() { public void run() { sesclient.sendEmail(request); } }); return true; } return false; } }
@Override public boolean sendEmail(List<String> emails, String subject, String body) { if (emails != null && !emails.isEmpty() && !StringUtils.isBlank(body)) { 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).withCharset(Config.DEFAULT_ENCODING); msg.setBody(new Body().withHtml(textContent)); request.setMessage(msg); Para.asyncExecute(new Runnable() { public void run() { sesclient.sendEmail(request); } }); return true; } return false; } }
sendEmailRequest.setDestination(new Destination().withToAddresses(config.getRecipientOverride())); apiMessage = String.format("Request sent to recipient override, %s.", config.getRecipientOverride()); } else { sendEmailRequest.setDestination(new Destination().withToAddresses(push.getToAddress()));