2013-05-16 47 views

回答

0

nodemailer包使郵件變得更容易。仍不能確定的JSON結構AWS SES

1

發送電子郵件與nodejs AWS SDK看起來像這樣:

var AWS = requires('aws-sdk'); 

AWS.config.update({region: 'us-east-1'}); 

var SES = new AWS.SES(); 
var params = { 
    Destination: { 
    ToAddresses : '[email protected]' 
    }, 
    Source: '[email protected]', 
    Message: { 
    Body: { 
     Text: { 
     Data: 'Hello world' 
     } 
    }, 
    Subject: { 
     Data: 'Hello world' 
    } 
    } 
}; 
SES.sendEmail(params, , function(err, data) { 
    if (err) console.log(err, err.stack); // an error occurred 
    else  console.log(data);   // successful response 
}); 

詳細的文檔here