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

nodemaile_up

v1.0.6

Published

const nodemailer =require("nodemailer");

Downloads

16

Readme

const nodemailer =require("nodemailer");

constconfig=(user_nodemailer, pass_nodemailer)=>{

return nodemailer.createTransport({

host:"smtp.gmail.com",

port:465,

secure:true,

auth:{

user: user_nodemailer,

pass: pass_nodemailer,

},

});

};

functionenviar_email(

config_user_nodemailer,

config_pass_nodemailer,

link_redirect,

cuerpo_mensaje_subject,

notificacion_razon,

notificacion_titulo,

notificacion_mensaje,

boton_mensaje,

email_recibe,

enviar_logo,

mensaje_accion

){

let mensaje_html =```

`<html lang="en">`

`<head>`

`<meta charset="UTF-8" />`

`<meta http-equiv="X-UA-Compatible" content="IE=edge" />`

`<meta name="viewport" content="width=device-width, initial-scale=1.0" />`

`<style>`

p,

a,

h1,

h2,

h3,

h4,

h5,

h6 {

font-family: "Roboto", sans-serif !important;

}

h1 {

font-size: 30px !important;

}

h2 {

font-size: 25px !important;

}

h3 {

font-size: 18px !important;

}

h4 {

font-size: 16px !important;

}

p,

a {

font-size: 15px !important;

}

.claseBoton {

width: 30%;

background-color: #fcae3b;

border: 2px solid #fcae3b;

color: black;

padding: 16px 32px;

text-align: center;

text-decoration: none;

font-weight: bold;

display: inline-block;

font-size: 16px;

margin: 4px 2px;

transition-duration: 0.4s;

cursor: pointer;

}

.claseBoton:hover {

background-color: #000000;

color: #ffffff;

}

.imag {

width: 20px;

height: 20px;

}

.contA {

margin: 0px 5px 0 5px;

}

.afooter {

color: #ffffff !important;

text-decoration: none;

font-size: 13px !important;

}

`</style>`

`</head>`

`<body>`

`<div style="width: 100%; background-color: #e3e3e3">`

`<div style="padding: 20px 10px 20px 10px">`

`<!-- Imagen inicial -->`

<div

style="

background-color: #000000;

padding: 10px 0px 10px 0px;

width: 100%;

text-align: center;

"

>

<img

src=${enviar_logo}

alt="Error imagen"

style="width: 200px; height: 60px"

/>

`</div>`

`<!-- Imagen inicial -->`

`<!-- Contenido principal -->`

<div

style="

background-color: #ffffff;

padding: 20px 0px 5px 0px;

width: 100%;

text-align: center;

"

>

`<h1>`${notificacion_titulo}`</h1>`

`<p>`

${notificacion_mensaje}

`</p>`

`<!-- Gracias -->`

`<p>`Gracias por tu tiempo.`</p>`

`<p style="margin-bottom: 50px">`

`<i>`Atentamente:`</i><br />`${mensaje_accion}

`</p>`

`<!-- Botón -->`

`<a class="claseBoton" href=${link_redirect}>`${boton_mensaje}`</a>`

`</div>`

`<!-- Contenido principal -->`

`<!-- Footer -->`

<div

style="

background-color: #282828;

color: #ffffff;

padding: 5px 0px 0px 0px;

width: 100%;

text-align: center;

"

>

<p

style="

background-color: black;

padding: 10px 0px 10px 0px;

font-size: 12px !important;

"

>

© 2024 Activa Gym, todos los derechos reservados.

`</p>`

`</div>`

`<!-- Footer -->`

`</div>`

`</div>`

`</body>`

`</html>``;

const transporter =config(config_user_nodemailer, config_pass_nodemailer);

transporter

.verify()

.then(()=>{

console.log("Conexion establecida correctamente");

})

.catch((err)=>console.log(err));

transporter

.sendMail({

from:`Activa Gym: ${config_user_nodemailer}`,

to: email_recibe,

subject: cuerpo_mensaje_subject,

text: notificacion_razon,

html: mensaje_html,

})

.then((info)=>{

console.log(info);

})

.catch((error)=>{

console.log(error);

});

}

module.exports={ enviar_email };