Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const nodemailer = require("nodemailer");
- // Création de la méthode de transport de l'email
- var transport = nodemailer.createTransport({
- host: "smtp.mailtrap.io",
- port: 2525,
- auth: {
- user: "282a3d165de31e",
- pass: "be3b011087f729"
- }
- });
- transport.sendMail({
- from: "Your sweetie grandchil <annelaure@wild.com>", // Expediteur
- to: "supergrandma@yopmail.com", // Destinataires
- subject: "Yo Grand Ma !", // Sujet
- text: "Can I get your cookie recipe please ? 🍪 I will cook you some of them !", // plaintext body
- html: "<p>Can I get your cookie recipe please ? 🍪</p>" // html body
- }, (error, response) => {
- if(error){
- console.log(error);
- } else{
- console.log("Message sent: " + response.message);
- }
- });
Add Comment
Please, Sign In to add comment