0.0.3 • Published 2 years ago
forzen-email v0.0.3
forzen-email
A simple Node email library
Setup
Create a file in your project's directory called mailer.json
Here is a template to follow for what to put inside this file. Fill this out with your email information:
{
"senderAddress": "ADDRESS",
"mailService": "MAIL SERVICE",
"password": "PASSWORD"
}senderAddress: The email address you wish to send emails from
mailService: The service you will be using to send emails, like gmail
password: This won't always be the regular email password you use to login. This might be the App Password. Find out more at this link https://support.google.com/mail/answer/185833?hl=en
Usage
The primary method to use is
async sendEmail(
recipients: string | string[],
subject: string,
message: string,
useHtml: boolean = true,
)Example:
await sendMail("test@test.com", "Hello!", "Hello there friend!");