List of usage examples for com.amazonaws.services.simpleemail AmazonSimpleEmailService sendEmail
SendEmailResult sendEmail(SendEmailRequest sendEmailRequest);
Composes an email message and immediately queues it for sending.
From source file:spikes.email.AmazonSimpleEmailServiceSpike.java
License:Open Source License
public static void main(String[] args) throws IOException { PropertiesCredentials credentials = new PropertiesCredentials( AmazonSimpleEmailServiceSpike.class.getResourceAsStream("AwsCredentials.properties")); AmazonSimpleEmailService service = new AmazonSimpleEmailServiceClient(credentials); verifyAddressIfNecessary(service, FROM); Destination destination = new Destination(Arrays.asList(TO)); Content subject = new Content(SUBJECT); Body body = new Body().withHtml(new Content(BODY)); Message message = new Message(subject, body); service.sendEmail(new SendEmailRequest(from(), destination, message)); System.exit(0);/*from ww w . ja va 2s . c o m*/ }