Last active
May 14, 2020 08:12
-
-
Save MPJHorner/b1c01d929284b0963b75b5f255984b70 to your computer and use it in GitHub Desktop.
Amazon SES NodeJS Test Script /w Configuration Set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ses = require('node-ses') | |
var client = ses.createClient({ | |
key: '%AWS_KEY_HERE%', | |
secret: '%AWS_SECRET_HERE%', | |
amazon: 'https://email.eu-west-2.amazonaws.com' | |
}); | |
// Give SES the details and let it construct the message for you. | |
client.sendEmail({ | |
to: '[email protected]', | |
from: '[email protected]', | |
cc: '[email protected]', | |
bcc: ['[email protected]', '[email protected]'], | |
subject: 'greetings', | |
message: 'your <b>message</b> goes here, <a href="https://google.com">Clicky Clicky (Click Tracking Test)</a>', | |
configurationSet: 'configuration-set-name', | |
altText: 'plain text' | |
}, function (err, data, res) { | |
if(err){ | |
console.log(err); | |
} | |
console.log(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment