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

pimatic-mail

v0.8.6

Published

Send mails from rule actions

Downloads

5

Readme

pimatic mail plugin

Provides an action handler to send mails from pimatic rules. It uses nodemailer v0.7 which supports all common mail transports.

Configuration

You can load the backend by editing your config.json to include:

{
  "plugin": "mail",
  "transport": "SMTP",
  "transportOptions": {
    "service": "Gmail", // sets automatically host, port and connection security settings
    "auth": {
        "user": "[email protected]",
        "pass": "userpass"
    }
  },
  "to": "[email protected]"
}

in the plugins section. For all configuration options see mail-config-schema. The transport options are transport dependent and listed at nodemailer v0.7.

Advanced Configuration Example for GMX

If your mail service provider is not on nodemailer's list of well known services an advanced transport configuration is required. Below, an example configuration for GMX is provided. This configuration deals with some issues which may also apply to other mail service providers:

  • Host and Port of the mail service. You can obtain this information from your mail service provider.
  • The GMX SMTP mailer is picky about encryption ciphers used and, thus, the cipher suite used for pimatic must be set to 'SSLv3'
  • The "from" address must be set explicitly to your mailbox address. Otherwise, the mail will be rejected with error 550 which is provides a measure against misuse of mail addresses. You should set the 'from' address as part of the plugin configuration.

Example:

{
  "plugin": "mail",
  "transport": "SMTP",
  "transportOptions": {
    "host": "mail.gmx.com",
    "port": 587,
    "tls": {
      "ciphers": "SSLv3"
    },
    "auth": {
      "user": "[email protected]",
      "pass": "TopSecret"
    },
    "maxConnections": 5
  },
  "from": "[email protected]"
}	

Usage

You can send mail messages as part of rule actions. The "send mail" action supports the following modifiers:

  • to: The mail recipient's address
  • from: The mail sender's address
  • text: An Unicode string containing the plaintext version of the message body. If, both, text and html modifiers are absent, the default text will be used as defined by the plugin configuration
  • html: An Unicode string containing the HTML version of the message body. If, both, text and html modifiers are present, an e-mail with a multi-part body will be generated containing the plain text and the HTML text
  • file: A path to a file which will be attached to the mail

Generally, each modifier can only by applied once per mail action. For to: and file: modifiers, multiple occurrences are supported.

Example Rule

IF it is 08:00 THEN send mail to:"[email protected]" subject:"Good morning!" text:"Good morning Dave!"

Credits