Skip to content

Instantly share code, notes, and snippets.

@matrixfox
Last active August 29, 2015 13:57
Show Gist options
  • Save matrixfox/9518269 to your computer and use it in GitHub Desktop.
Save matrixfox/9518269 to your computer and use it in GitHub Desktop.
You suck at social attacks.school
var nodemailer = require("nodemailer");
// create reusable transport method (opens pool of SMTP connections)
var smtpTransport = nodemailer.createTransport({
service: "Gmail",
auth: {
user: "*******************",
pass: "*******************"
}
});
// setup e-mail data with unicode symbols
var mailOptions = {
from: "Fred Foo ✔ <[email protected]>", // sender address
to: "[email protected]", // list of receivers
subject: "You suck at Social Attacks", // Subject line
html: "<p>A request has been submitted to recover a lost password from <a href='try/this/but/leave/me/alone'>https://gbclient.hostgator.com/</a> from the IP address: 6.6.6.6</p><p>To complete the password change, please visit the following URL and enter the requested info:</p><a href='U/Suck/At/Social/Attacks'>https://gbclient.hostgator.com/login/reset/hd8S8fjfkIoPF394F32FHi5sD3rF</a><p>Passwords must be alphanumeric, at least 8 characters long, and not be considered a dictionary word.</p><p>If you did not specifically request this password change, please disregard this notice.</p><p>We are available 24/7. If you have any questions, comments, or concerns, please do not hesitate to contact us.</p><p>Thank you,<br><a href='this/makes/me/sleepy/'>HostGator.com</a> Support</p><p>Toll-free: 1-866-96-GATOR<br>International: 001-713-574-5287</p>" // html body
}
// send mail with defined transport object
smtpTransport.sendMail(mailOptions, function(error, response){
if(error){
console.log(error);
}else{
console.log("Message sent: " + response.message);
}
// if you don't want to use this transport object anymore, uncomment following line
smtpTransport.close(); // shut down the connection pool, no more messages
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment