List of usage examples for com.amazonaws.services.simpleemail.model SendRawEmailResult toString
@Override
public String toString()
From source file:com.hiveTown.util.AmazonSESUtil.java
License:Open Source License
public String sendRawEmail(String[] toEmail, String fromAddress, MimeMessage mimeMessage) { try {/*from w w w. ja v a 2 s.c om*/ ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); mimeMessage.writeTo(outputStream); RawMessage rawMessage = new RawMessage(ByteBuffer.wrap(outputStream.toByteArray())); // Assemble the email. SendRawEmailRequest request = new SendRawEmailRequest().withSource(fromAddress) .withDestinations(toEmail).withRawMessage(rawMessage); // Send the email. SendRawEmailResult r = this.getClient().sendRawEmail(request); LOGGER.info(r.toString()); return r.getMessageId(); } catch (Exception ex) { LOGGER.error(ex.toString()); } return null; }