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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@imail.ma/imail

v1.0.1

Published

Librairie pour l'envoie d'e-mails via imail.ma en Node.

Downloads

14

Readme

imail.ma for Node

Librairie pour l'envoie d'e-mails via imail.ma en Node.

Installation

Installez la librairie en utilisant NPM:

$ npm install @imail.ma/imail --save

Usage

L'envoi d'un e-mail est très simple. Suivez simplement l'exemple ci-dessous. Avant de pouvoir commencer, vous vous devez vous connecter à notre interface Web et générer un nouvel identifiant API.

// Inclure la librairie imail.ma 
var Imail = require('@imail.ma/imail');

// Créez un nouveau client imail à l'aide de la clé de serveur que vous générez dans l'interface Web 
var client = new Imail.Client('https://mx.imail.ma', 'your-api-key');

// Créer un nouveau message 
var message = new Imail.SendMessage(client);

// Ajouter quelques destinataires 
message.to('[email protected]');
message.to('[email protected]');
message.cc('[email protected]');
message.bcc('[email protected]');

// Spécifiez de qui le message doit provenir. Cela doit provenir d'un domaine vérifié 
// sur votre serveur de messagerie.
message.from('[email protected]');

// Définir le sujet
message.subject('Salam!');

// Définir le contenu de l'e-mail 
message.plainBody('Hello world!');
message.htmlBody('<p>Hello world!</p>');

// Ajouter des en-têtes personnalisés
message.header('X-PHP-Test', 'value');

// Joindre des fichiers 
message.attach('textmessage.txt', 'text/plain', 'Hello world!');

// Envoyez le message et obtenez le résultat 
message.send()
  .then(function (result) {
    var recipients = result.recipients();
    // Parcourez chacun des destinataires pour obtenir l'ID du message
    for (var email in recipients) {
      var message = recipients[email];
      console.log(message.id());    // Renvoie l'ID du message 
      console.log(message.token()); // Renvoie le jeton du message 
    }
  }).catch(function (error) {
    // Faire quelque chose avec l'erreur 
    console.log(error.code);
    console.log(error.message);
  });