Guest User

Untitled

a guest
Apr 27th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. {
  2. "name": "recette",
  3. "version": "1.0.0",
  4. "description": "Recette BCIT GROUP 22 Project",
  5. "main": "index.js",
  6. "scripts": {
  7. "test": "echo "Error: no test specified" && exit 1"
  8. },
  9. "repository": {
  10. "type": "git",
  11. "url": "git+https://github.com/lewisfang59/recette.git"
  12. },
  13. "author": "Group22",
  14. "license": "ISC",
  15. "bugs": {
  16. "url": "https://github.com/lewisfang59/recette/issues"
  17. },
  18. "homepage": "https://github.com/lewisfang59/recette#readme",
  19. "dependencies": {
  20. "@sendgrid/mail": "^6.2.1",
  21. "nodemailer": "^4.6.4"
  22. }
  23. }
  24.  
  25. // using SendGrid's v3 Node.js Library
  26. // https://github.com/sendgrid/sendgrid-nodejs
  27. var nodemailer = require('nodemailer');
  28. var transporter = nodemailer.createTransport({
  29. service: 'gmail',
  30. auth: {
  31. user: 'xx@gmail.com',
  32. pass: 'xxx'
  33. }
  34. });
  35.  
  36. var mailOptions = {
  37. from: 'recette.group22@gmail.com',
  38. to: 'hwan5263@gmail.com',
  39. subject: 'Sending Email using Node.js',
  40. text: 'That was easy!'
  41. };
  42.  
  43. transporter.sendMail(mailOptions, function(error, info){
  44. if (error) {
  45. console.log(error);
  46. } else {
  47. console.log('Email sent: ' + info.response);
  48. }
  49. });
Add Comment
Please, Sign In to add comment