@lfkz/nsemail
v1.0.6
Published
This is an encapsulation package for sending emails.
Downloads
7
Readme
Describe
EN This is an encapsulation package for sending emails.(nodejs)
CN 这是一个用于发送电子邮件的封装包。(nodejs)
Example
const nsemail = require('@lfkz/nsemail')
nsemail({
host:'smtp.qq.com',
port:465,
secure:true,
auth:{
user:'From_email',
pass:'Authorize_code'
}
},{
from:'Email_username<From_email>',
to:'To_email',
cc:'Cc_mail',
bcc:'Secret_mail',
subject:'This is a test email title.',
text:'Text',
html:'<h1>Text</h1>',
attachments:[{
filename:'Attachment_name'
path:'Attachment_path'
}]
},(info) => {
// success function
},(err) => {
// error function
})