Reputation: 41
I am trying to send a simple email through the AWS SES service. Unfortunately I keep getting an error:
com.amazonaws.services.simpleemail.model.AmazonSimpleEmailServiceException: Missing final '@domain' (Service: AmazonSimpleEmailService; Status Code: 400; Error Code: InvalidParameterValue; Request ID: [id]; Proxy: null)
The code is almost straight from the examples:
AmazonSimpleEmailService client = this.getClient();
SendEmailRequest request = new SendEmailRequest().withDestination(new Destination().withToAddresses(this.emailTo))
.withMessage(new Message().withSubject(new com.amazonaws.services.simpleemail.model.Content().withData(email.getTitle()))
.withBody(new Body().withText(
new com.amazonaws.services.simpleemail.model.Content().withCharset("UTF-8").withData(email.getContent()))))
.withSource(this.emailFrom).withConfigurationSetName("name").withReplyToAddresses(email.getEmailFrom());
client.sendEmail(request);
In the emailFrom and emailTo fields, a SES-verified email address with a correctly entered domain and @ sign is provided. In mail.getEmailFrom() adress have domain and @ too.
What I can do?
I tried changing the settings, giving addresses manually, and also as arrays. If I specify "Amazon Resource Name (ARN)" instead of emailFrom, I get an error:
com.amazonaws.services.simpleemail.model.AmazonSimpleEmailServiceException: Nested group (Service: AmazonSimpleEmailService; Status Code: 400; Error Code: InvalidParameterValue; Request ID: [id]; Proxy: null)
Upvotes: 1
Views: 1025