npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-boot-mail

v1.1.7

Published

Node Boot is a framework for REST API management and it is similar to Spring boot. Node Boot is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with and fully supports TypeScript and

Downloads

5

Readme

What is node-boot?

Node Boot is a framework for REST API management and it is similar to Spring boot. Node Boot is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with and fully supports TypeScript and combines elements of OOP (Object Oriented Programming).

Node boot makes use of robust HTTP Server frameworks is Express. This gives developers the freedom to use the third-party modules which are available for the platform.

What can I do with it?

You can simplify make your Node.JS web application with Typescript by using Dependency Injection, and RESTful apis throughout simple annotations.

What about this library?

This library is enable the mail feature for the Node Boot framework only. It is easy to use like Spring mail. We have enable the feature to send mail via smtp

How do I use it?

  1. First of all you need install the lib in Node Boot application.
  2. Now you need to setup the properties in application.properties file in application.

SMTP

For the send email via smtp you need to set the below property in application.properties.

mail.type=smtp
mail.host=
mail.port=
mail.secure   //true/false
mail.tls=     //true/false
mail.auth.user=
mail.auth.pass=
mail.logger=   //true/false

We are provide the two diffrent ways to use send the email.

  1. Abstract class

  2. Direct method

  3. Abstract class Abstract class machanism is use for the loose coupling. You can create the service class and extend the BootMail abstract class. Now you can inject your service and you will able to get the sendMail method to send the mail.

import { Service } from "node-boot-core";
import { BootMail } from "node-boot-mail";

@Service("MailService")
export class MailService extends BootMail{
  constructor() {
    super()
  }
}


@Controller("home")
class MyClass {

    @Autowired("MailService")
    private mailService: MailService;

    private method() {
        this.mailService.sendMail({ body: "", subject: "", to: "" });
    }
}
  1. Direct method We are provide the other way to send mail via direct method.
import { sendMail } from 'node-boot-mail';

@Service("MailService")
export class MailService {
  public sendEmail() {
    await sendMail({ body: "", subject: "", to: "" });
  }
}

The send mail function accept the below properties:

from - The email address of the sender. All email addresses can be plain ‘[email protected]’ or formatted '“Sender Name” [email protected]', see Address object for details to - Comma separated list or an array of recipients email addresses that will appear on the To: field cc - Comma separated list or an array of recipients email addresses that will appear on the Cc: field bcc - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field subject - The subject of the email body - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object. attachments - An array of attachment objects (see Using attachments for details). Attachments can be used for embedding images as well.

Optional parameters

headers - An object or array of additional header fields (e.g. {“X-Key-Name”: “key value”} or [{key: “X-Key-Name”, value: “val1”}, {key: “X-Key-Name”, value: “val2”}]). Read more about custom headers priority - Sets message importance headers, either ‘high’, ‘normal’ (default) or ‘low’ messageId - optional Message-Id value, random value will be generated if not set date - optional Date value, current UTC string will be used if not set

Consulting

With official support, you can get expert help straight from Node Boot core team. We provide dedicated technical and team augmentation.

Support

Node Boot is an MIT-licensed open source project. It can grow thanks to the support from the amazing team members.

License

Node Boot is MIT, Apache and BSD licensed.