Methods
WEmail(optopt) → {Promise}
- Description:
寄送email
- Source:
Example
import WEmail from 'w-email'
//opt
let opt = {
srcName: 'test name',
srcEmail: 'your email',
srcPW: 'your password',
emTitle: 'test title',
emContent: '<h4>test head</h4>'+'<div>test content</div>',
toEmails: 'to email',
//toEmailsCC: 'to email',
//toEmailsBCC: 'to email',
emAttachments: {
filename: 'your filename',
path: 'your filepath'
}
}
//WEmail
new WEmail(opt)
.then((msg)=>{
console.log('then',msg)
})
.catch((err)=>{
console.log('catch',err)
})
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opt |
* |
<optional> |
{}
|
輸入設定物件,預設{} Properties
|
Returns:
回傳Promise,resolve回傳成功訊息,reject回傳錯誤訊息
- Type
- Promise