Repository navigation
0.0.2-alpha.0
Pre-release
Pre-release
·
1 commit
to v0.0.2-alpha.0
since this release
!Important to read before continuing.
SMTP_HOST=smtp.gmail.com Default settings for the Google server)
SMTP_PORT=465 Default settings for the Google server
SMTP_SECURE=true Default settings for the Google server
SMTP_USER="test.user1@example.com" This email must be registered as a developer in Gmail
SMTP_PASS="1An3C0FZaNU" Key assigned by Gmail
Installation:
npm install quickly-notify
Use to library:
const { quickMailNotification } = require("quickly-notify");
Necessary parameters:
- Email for client (client).
- Who sends it (author).
- Type of service (message).
- This is the body of the email that will reach your clients (htmlConntent)
const client = "test.user@example.com"
const author= "Test Subject"
const message= "This is a test message for product change."
const htmlConntent = "<h1>Example body email<h1/>";
Async context:
(async () => {
try {
const response = await quickMailNotification(
client,
author,
message,
htmlConntent
);
console.log("#response", response);
return this response.
} catch (error) {
console.error(error);
return this response.
}
})();