Sending emails with AWS SES


#1

1- Configure the email to send

var mail = Mail.make({
  from         : "root@c3-e.com",
  to           : ['some@valid.email'],
  content_type : "text/html",
  subject      : 'Test for Email API',
  content      : "This is a test email. This is an automated email. Please do not respond to this email.\n\n"
});
Mail.send(mail);

2- Configure the SES object with AWS credentials

var credentials = AwsCredentials.make({
  accessKey: 'aws-access-key',
  secretKey: 'aws-secret-key',
  region   : 'region'
});
		
var ses = AwsSes.make({
  rawName: "SES",
  ownerCredentials: credentials
});

3- Now the email should be ready to send:

ses.sendEmail(mail);

Is there an api that I can use to generate an email to a given email address?
#2

You may need to persist the Mail object before sending, to make it work.