Blog Post Cover

Introduction to Discord Bots

Introducing Angra - the Javascript NPM library that simplifies the process of composing and sending transactional emails. With Angra, developers can easily send emails such as registration confirmations, verification codes, and order confirmations without having to write any additional code. The library is available for installation via npm or yarn, and once installed, users simply need to provide their SMTP credentials for the library to take care of the rest. This means that developers no longer have to spend time writing and testing email-sending code, and can instead focus on building the core functionality of their application. One of the key features of Angra is its ease of use. With just a few lines of code, developers can send an email with a custom template and variables.

github.com / accretence / angra

Compose and send transactional email templates using Nodemailer.

The library also supports sending emails in bulk, which is useful for sending out large numbers of emails, such as order confirmations, at once. Another great feature of Angra is its support for dynamic templates. This allows developers to create email templates that can be easily updated and reused, without having to make changes to the codebase. This is particularly useful for businesses that need to send out emails on a regular basis, such as for promotions or updates. In addition to its ease of use and template support, Angra also provides robust error handling. It will automatically handle any errors that may occur during the sending process, such as invalid credentials or a failure to connect to the SMTP server. This ensures that emails are sent successfully and that any issues are quickly identified and resolved. Overall, Angra is a powerful and easy-to-use Javascript NPM library that simplifies the process of composing and sending transactional emails. Whether you're a developer working on a small personal project or a business looking to streamline your email sending process, Angra is an excellent choice.

With its easy installation, simple usage, and robust features, Angra is a must-have for any developer looking to send transactional emails in their JavaScript application. So go ahead, give it a try and see the difference it can make in your workflow. In conclusion, Angra is a Javascript NPM library that simplifies the process of composing and sending transactional emails. With Angra, developers can easily send emails such as registration confirmations, verification codes, and order confirmations without having to write any additional code.

The library is available for installation via npm or yarn, and once installed, users simply need to provide their SMTP credentials for the library to take care of the rest, and focus on the core functionality of their application.

yarn add angra

Angra exposes several functions that let you send transctional emails with minimum setup:

await sendVerifyMail() 
await sendForgotPassword()
await sendResetPassword()
await sendSubscribe()
await sendUnsubscribe()

You need to provide SMTP credentials obtained from your Email provider in .env:

MAIL_SMTP_HOST = 
MAIL_SMTP_USER =
MAIL_SMTP_PASS =
MAIL_SMTP_PORT =
MAIL_SMTP_SECURE = // Boolean
MAIL_SMTP_TLS_REJECT_UNAUTHORIZED = // Boolean
MAIL_SMTP_TLS_CIPHER =
MAIL_SMTP_SERVICE =
MAIL_SMTP_VERBOSE = // Boolean, Nodemailer will log details if true

Not all of these parameters are required. For example if you're using Gmail you only need these parameters:

MAIL_SMTP_USER = // Your Gmail Address 
MAIL_SMTP_PASS = // Google App Password
MAIL_SMTP_SERVICE = 'Gmail'

Each of the exposed function require a certain set of parameters passed into the function, For example:

await sendVerifyMail( sender_title, recipient_address, email_verification_code, verify_url, unsubscribe_url )