Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
const mailer = require('nodemailer-promise')
const config = require('./config.json')
async function main() {
try {
const sendEmail = mailer.config(config)
const message = {
from: 'sender@email.com', // sender address
to: 'marktyers@gmail.com', // list of receivers
subject: 'Subject of your email', // Subject line
html: '<p><a href="google.com">Your html here</a></p>'// plain text body
}
await sendEmail(message)
} catch (err) {
console.log(`error: ${err.message}`)
}
}
main()