nodemailer

mail.js in common folder is used to send the validate email. After registering the user account or login in the system, system will send a verify email to validate the email. But the destiny mailbox can not recieve any validate email from the system.

And the console of the server print the below error information:
{ [Error: read ECONNRESET]
code: ‘ECONNRESET’,
errno: ‘ECONNRESET’,
syscall: ‘read’,
stage: ‘data’ }
errors happens!

The messages should come from
console.log(err);
console.log(‘errors happens!’);

in function of
transport.sendMail(data, function (err)
in the file of
mail.js

I solve the problem in the following steps:
1 google the error, seems that is relates to dns problem,
ping http://www.baidu.com and the smtp server:smtp.126.com
it can reach the destination.
Then I change the DNS server from 8.8.8.8 to another applicable DNS server.
But errors still exist.
2 Check the config file:config.js
correct the errors, and try many other smtp server, problem still exists.
3 google it, saying that smtp.126.com smtp server has to be connected with special access code. Then I Register it and got the authorized code and password. Then modify the config file.

Then the system can send the validate email properly. But when linking the url to verify the email, server does not response.

Note: Sometimes, the server occasionaly occurs the ping promble, occasionaly, it can get through http://www.baid.com and smtp.126.com and even can not reach the router 192.168.1.101 and the workstation on the same network while it can be visited by ftp and ssh with other work station. So strange!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s