-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
32 lines (31 loc) · 897 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const mailjet = require('node-mailjet')
.connect("7ac9fa6ec5ad850435b41d5b26a91d56", 'bc6231da47ea7ab62af8d3e0829ce641');
const request = mailjet
.post("send", { 'version': 'v3.1' })
.request({
"Messages": [
{
"From": {
"Email": "noreply@devronins.com",
"Name": "STMINA"
},
"To": [
{
"Email": "laxman@devronins.com",
"Name": "Laxman"
}
],
"TemplateID": 3817703,
"TemplateLanguage": true,
"Subject": "Test email",
"Variables": {}
}
]
})
request
.then((result) => {
console.log(JSON.stringify(result))
})
.catch((err) => {
console.log(err.statusCode)
})