deepexi-ali-email
v1.0.0
Published
nodejs sdk for aliyun DirectMail API
Downloads
2
Readme
forked from ali-email
Nodejs SDK for Aliyun DirectMail service
Install
npm install deepexi-ali-email
Usage
SingleSendMail
var aliEmail = require("deepexi-ali-email");
var accessKeyID = process.env.ALI_SMS_ACCESSKEYID ;
var accessKeySecret = process.env.ALI_SMS_ACCESSKEYSECRET ;
var configSingle = {
action :'SingleSendMail',
accessKeyID : accessKeyID,
accessKeySecret : accessKeySecret,
accountName :'[email protected]',
replyToAddress :true,
addressType :1,
toAddress :'[email protected]',
fromAlias :'xxx company',
subject :'subject',
textBody :'test'
};
aliEmail(configSingle, function(err, body) {
console.log(err);
console.log(body);
});
BatchSendMail
var aliEmail = require("deepexi-ali-email");
var accessKeyID = process.env.ALI_SMS_ACCESSKEYID ;
var accessKeySecret = process.env.ALI_SMS_ACCESSKEYSECRET ;
var configSingle = {
action :'BatchSendMail',
accessKeyID : accessKeyID,
accessKeySecret : accessKeySecret,
accountName :'[email protected]',
templateName :'test',
receiversName :'test',
};
aliEmail(configSingle, function(err, body){
console.log(err);
console.log(body);
});