List of usage examples for com.amazonaws.services.simpleemail AWSJavaMailTransport AWS_SECRET_KEY_PROPERTY
String AWS_SECRET_KEY_PROPERTY
To view the source code for com.amazonaws.services.simpleemail AWSJavaMailTransport AWS_SECRET_KEY_PROPERTY.
Click Source Link
From source file:com.clicktravel.infrastructure.mail.aws.AmazonMailSender.java
License:Apache License
public void init() { final Properties props = getJavaMailProperties(); props.setProperty(MAIL_TRANSPORT_PROTOCOL_KEY, "aws"); props.setProperty(AWSJavaMailTransport.AWS_ACCESS_KEY_PROPERTY, awsCredentials.getAWSAccessKeyId()); props.setProperty(AWSJavaMailTransport.AWS_SECRET_KEY_PROPERTY, awsCredentials.getAWSSecretKey()); // set port to -1 to ensure that Spring calls the equivalent of "transport.connect()" setPort(-1);/*from w w w . j av a2 s. c o m*/ }
From source file:org.springframework.integration.aws.ses.core.DefaultAmazonSESMailSender.java
License:Apache License
public DefaultAmazonSESMailSender(AWSCredentials credentials) { if (credentials == null) { throw new AWSOperationException(null, "Credentials cannot be null, provide a non null valid set of credentials"); }/*w w w . j a v a2 s . c om*/ /* * Setup JavaMail to use the Amazon Simple Email Service by specifying * the "aws" protocol. */ Properties properties = new Properties(); properties.setProperty("mail.transport.protocol", "aws"); properties.setProperty(AWSJavaMailTransport.AWS_ACCESS_KEY_PROPERTY, credentials.getAccessKey()); properties.setProperty(AWSJavaMailTransport.AWS_SECRET_KEY_PROPERTY, credentials.getSecretKey()); javaMailSender.setJavaMailProperties(properties); }