Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "recette",
- "version": "1.0.0",
- "description": "Recette BCIT GROUP 22 Project",
- "main": "index.js",
- "scripts": {
- "test": "echo "Error: no test specified" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lewisfang59/recette.git"
- },
- "author": "Group22",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/lewisfang59/recette/issues"
- },
- "homepage": "https://github.com/lewisfang59/recette#readme",
- "dependencies": {
- "@sendgrid/mail": "^6.2.1",
- "nodemailer": "^4.6.4"
- }
- }
- // using SendGrid's v3 Node.js Library
- // https://github.com/sendgrid/sendgrid-nodejs
- var nodemailer = require('nodemailer');
- var transporter = nodemailer.createTransport({
- service: 'gmail',
- auth: {
- user: 'xx@gmail.com',
- pass: 'xxx'
- }
- });
- var mailOptions = {
- from: 'recette.group22@gmail.com',
- to: 'hwan5263@gmail.com',
- subject: 'Sending Email using Node.js',
- text: 'That was easy!'
- };
- transporter.sendMail(mailOptions, function(error, info){
- if (error) {
- console.log(error);
- } else {
- console.log('Email sent: ' + info.response);
- }
- });
Add Comment
Please, Sign In to add comment