On nodeemailer

  node.js, question

Main function: use nodeemailer to write a function of sending mail.
Environment:

  1. Nodemailer version 2.3.0,

  2. Node version 4.1.2
    The code is as follows:

var transporter = nodeemialer.createTransport({
 host: "smtp.163.com",
 secureConnection: true, // use SSL
 port: 25, // port for secure SMTP
 auth: {
 user: "*****@163.com",
 pass: "*****"
 bracket
 });
 var mailOptions = {
 from: '"share__us" <****@163.com>',
 to: '***@msn.com',
 subject: 'Hello',
 text: 'Hello world',
 html: '<b>Hello world</b>',
 attachments: [{
 filename  : '',
 content : ''
 },{
 filename  : '',
 path : ''
 }]
 bracket
 transporter.sendMail(mailOptions, function(error, info){
 if(error){
 console.log(error);
 }else{
 Log ('messagesent:' plus info.response);
 bracket
 });
 transporter.close();

After running, the following error will be returned:

{ [Error: Invalid login: 550 User has no permission]
 code: 'EAUTH',
 response: '550 User has no permission',
 responseCode: 550 }

But my user name and password are correct. May I ask you, Great God, what’s wrong with my code? Or what steps have I missed?

The detailed answers are as follows:

Netease’s newly registered email smtp authentication uses an authorization code, not a password.
Settings ->POP3/SMTP/IMAP

clipboard.png

Then use the authorization password when createTransport

I remember that 163postbox’s smtp password is not your account password. . . . Take a look at the settings in 163postbox.