daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Aug 31st, 2015 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var nodemailer = require("nodemailer");
  2.  
  3. var smtpTransport = nodemailer.createTransport("SMTP",{
  4.    service: "Gmail",
  5.    auth: {
  6.        user: "gmail.user@gmail.com",
  7.        pass: "gmailpass"
  8.    }
  9. });
  10.  
  11. smtpTransport.sendMail({
  12.    from: "My Name <me@example.com>", // sender address
  13.    to: "Your Name <you@example.com>", // comma separated list of receivers
  14.    subject: "Hello ✔", // Subject line
  15.    text: "Hello world ✔" // plaintext body
  16. }, function(error, response){
  17.    if(error){
  18.        console.log(error);
  19.    }else{
  20.        console.log("Message sent: " + response.message);
  21.    }
  22. });
  23.        
  24. <form id="mainForm">
  25.     <input type="file" id="fileUpload">
  26.     <input type="submit" id="submit" name="submit">
  27. </form>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top