Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. exports.newRegistration=function(parametros,callback)
  2. {
  3. var mailOptions =
  4. {
  5. from: "<myemailingoogle@gmail.com>",//my email
  6. to: parametros.useremail,//user email
  7. subject: 'Welcome '+parametros.useremail+'.',
  8. html: '<br><b>Hello</b><br>'+ // html
  9.  
  10. };
  11. var smtpTransport = nodemailer.createTransport("SMTP",
  12. {
  13. service: "Gmail",
  14. secureConnection: true,
  15. auth:
  16. {
  17. user: "myemailingoogle@gmail.com",
  18. pass: "7ftera359c28a",
  19. },
  20. });
  21. smtpTransport.sendMail(mailOptions, function(err, response)
  22. {
  23. if(err)
  24. {
  25. smtpTransport.close();
  26. console.warn(err);
  27. return callback(err,null);
  28. }else{
  29. smtpTransport.close();
  30. return callback(null,response);
  31. }
  32. });
  33. }
  34.  
  35. mail mymailin@gmail.com
  36. Cc: // press enter
  37. Subject: Welcome
  38.  
  39. Hello Mail.
  40.  
  41. // Ctrl+D
  42.  
  43. smtp: '535 5.7.8 Error: authentication failed: generic failuren'
  44.  
  45. telnet localhost 25
  46. ehlo localhost
  47. 250-mydomain.com
  48. 250-PIPELINING
  49. 250-SIZE 10240000
  50. 250-VRFY
  51. 250-ETRN
  52. 250-STARTTLS
  53. 250-AUTH PLAIN LOGIN
  54. 250-AUTH=PLAIN LOGIN
  55. 250-ENHANCEDSTATUSCODES
  56. 250-8BITMIME
  57. 250 DSN
  58. mail to: myuserin@gmail.com
  59. 501 5.5.4 Syntax: MAIL FROM:<address>
  60. mail from: info@mydomain.com
  61. 250 2.1.0 Ok
  62. rcpt to: myuserin@gmail.com
  63. 451 4.3.0 <myuserin@gmail.com>: Temporary lookup failure
  64. data
  65. 554 5.5.1 Error: no valid recipients
  66. AUTH LOGIN
  67. 503 5.5.1 Error: MAIL transaction in progress
  68.  
  69. 220 mydomain.com ESMTP Postfix (Ubuntu)
  70. ehlo localhost
  71. 250-mydomain.com
  72. 250-PIPELINING
  73. 250-SIZE 10240000
  74. 250-VRFY
  75. 250-ETRN
  76. 250-STARTTLS
  77. 250-AUTH PLAIN LOGIN
  78. 250-AUTH=PLAIN LOGIN
  79. 250-ENHANCEDSTATUSCODES
  80. 250-8BITMIME
  81. 250 DSN
  82. AUTH LOGIN
  83. 334 VXNlcm5hbWU6
  84. UbuntuUser
  85. 535 5.7.8 Error: authentication failed: another step is needed in authentication
  86.  
  87. 220 mydomain.com ESMTP Postfix (Ubuntu)
  88. ehlo localhost
  89. 250-mydomain.com
  90. 250-PIPELINING
  91. 250-SIZE 10240000
  92. 250-VRFY
  93. 250-ETRN
  94. 250-STARTTLS
  95. 250-AUTH PLAIN LOGIN
  96. 250-AUTH=PLAIN LOGIN
  97. 250-ENHANCEDSTATUSCODES
  98. 250-8BITMIME
  99. 250 DSN
  100. auth login
  101. 334 VXNlcm5hbWU6
  102. root
  103. 334 UGFzc3dvcmQ6
  104. rootPassword
  105. 535 5.7.8 Error: authentication failed: another step is needed in authentication
  106.  
  107. Jun 20 15:50:16 myname postfix/smtpd[12528]: warning: localhost[127.0.0.1]: SASL login authentication failed: another step is needed in authentication
  108.  
  109. var email = require("emailjs");
  110.  
  111. postfixSend = function postfixSend(emailInfo, callback) {
  112.  
  113. var server = email.server.connect({
  114. user: "yourEmailAccountUser",
  115. password: "yourPassword",
  116. host: "localhost",
  117. ssl: false
  118. });
  119.  
  120. server.send({
  121. text: emailInfo.msg,
  122. from: emailInfo.from,
  123. to: emailInfo.to,
  124. subject: emailInfo.subject
  125. }, function(err, message) {
  126. callback(err);
  127. });
  128.  
  129. }
  130.  
  131. exports.postfixSend = postfixSend;
  132.  
  133. pwcheck_method: auxprop
  134. auxprop_plugin: sasldb
  135. mech_list: PLAIN LOGIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement