-
Notifications
You must be signed in to change notification settings - Fork 0
FranzZemen/bsh-aws-ses-send
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
bsh-aws-ses-send provides basic capability to send an email using SES. Credentials can either be passed in (not recommend) or set per ASWS documentation in environment variables or in the credentials file. ===== install: npm install bsh-aws-ses-send ===== usage: var sendEmail = require ('bsh-aws-ses-send')(region, credentialsProfile, accessKeys); WHERE: sendEmail is a function that returns a Promise region = AWS region (string) - required credentialsProfile = AWS profile in the AWS credentials file - optional accessKeys = {accessKeyId: 'your access key', secretAccessKey: 'your secret access key'} - optional If you don't provide credentialsProfile or accessKeys, the module will attempt to load access keys from the environment using AWS environment parameters: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY OR AMAZON_ACCESS_KEY_ID AMAZON_SECRET_ACCESS_KEY The returned Promise's success value is the AWS return object, which is often of little interest. The returned Promise's failure value is either a validation Error or an AWS error object ===== Invoke sendMail as follows: sendMail(email).then(function(successVal) { // Success code }, function(errorVal) { // Error code }); WHERE: var email = {from:'from email address', // required toAddresses: ['toAddress1','toAddress2'], // optional ccAddresses: ['toAddress1','toAddress2'], // optional bccAddresses: ['toAddress1','toAddress2'], // optional subject: 'subject', // required textBody: 'textBody', // optional htmlBody: 'htmlBody' // optional };
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published