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

xmpp-smtp-gw

v0.3.0

Published

xmpp smtp gateway

Downloads

16

Readme

XMPP SMTP Gateway

build status

A xmpp gateway to send emails from your xmpp messenger.

Description

I needed a simple and lightweight xmpp -> smtp gateway, but could not find a good one. This module enables me to send simple emails right from my chat messenger.

Architecture

Run it

# install it as a global component
npm install -g xmpp-smtp-gw
xmpp-smtp-gw configfile

# start it from the installation directory
node bin/xmpp-smtp-gw config/component.json
# start with debugging
DEBUG=* node bin/xmpp-smtp-gw config/component.json

# This project also ships with a `Procfile` and plays well 
# with foreman 
foreman start 

foreman enables you to generate upstart scripts for your node project. Further information is available at UPSTART-EXPORT

Configuration

This module delivers as a XMPP component () or XMPP s2s component. Both components behave similar.

Notes

Be aware that it this module does not generate different content types for images. Either use inline images via data urls or use external hosted images.

Tests

Grunt

The gateway comes with jshint and mocha test. Just run

grunt test

Vagrant

The integration with prosody is tested with vagrant and Ubuntu 12.04.

vagrant up

This will:

  • Boot up Ubuntu 12.04
  • Install Prosody
  • Prepares Prosody to accept a component smtp.example.com (Prosody config) or talk with an domain xmppsmtpgateway.com (bind dns config) via a server-2-server connection.

Afterwards you need to add the following entry to your hosts file in /etc/hosts:

192.168.55.10   example.com

Once you got this try to ping example.com and you should see a connection to 192.168.55.10. As a next step you need to configure the SMTP server in config/component.json and config/s2s.json. Just add the server and the mailbox credentials in mailer.config

Now we are ready to prepare the XMPP messages. Configure test/client/component/message.xml and test/client/s2s/message.xml with a proper target. e.g. change romeo\[email protected] to [email protected]. The local part of the jid needs to be escaped according to XEP-0106: JID Escaping.

Test the XMPP Component

vagrant ssh
cd /vagrant
foreman start

# open a new terminal and start
node test/client/component/send.js

Test the XMPP Server-2-Server

# on your machine 
DEBUG=* node bin/xmpp-smtp-gw config/s2s.json

# open a new terminal and start
node test/client/s2s/send.js

Send messages from XMPP messenger

If you would like to send emails directy from your xmpp client, configure the user [email protected] with the password me in your favorite XMPP messenger and send a message to user\[email protected] (component) or user\[email protected] depending on the setup you use.

Future features

  • Thread support

Author

  • Christoph Hartmann
  • Sessionbird GmbH

License

MIT