We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a26e2bb commit abc896bCopy full SHA for abc896b
nodeMailer.js
@@ -0,0 +1,30 @@
1
+// Nodemailes is a module to send mails
2
+// Download using ```npm install nodemailer
3
+var mail = require('nodemailer');
4
+
5
+// To send a simple mail
6
+// To send a mail you need some kind of transport
7
+var transport = mail.createTransport({
8
+ service: 'gmail', // you mail service provider
9
+ auth:{
10
+ user: 'email@gmail.com',
11
+ pass: 'secret'
12
+ }
13
+});
14
15
+// Now mail structure
16
+var mailStructure = {
17
+ from: 'email@gmail.com',
18
+ to: 'reciever@anything.com',
19
+ subject: 'Checking Nodemailer',
20
+ text: 'You got the meassage?'
21
+};
22
23
+// Everything is ready, just send the mail
24
+transport.sendMail(function (err, info){
25
+ if (err){
26
+ console.log('error');
27
+ } else {
28
+ console.log('Email send: ' + info.response);
29
30
0 commit comments