Email node error "SENDING FAILED"

1,649 views
Skip to first unread message

Luiey

unread,
Apr 18, 2016, 3:13:24 AM4/18/16
to Node-RED
Guys,

I'm having problem with email out node where it stated "Send Failed" on bottom of email nodes. Test it to 3 types of mails (gmail,ymail and office mail)
** Replacing alias with -at- for unlink purposes.

SETTINGS:-
GOOGLE MAIL
Port: 465 / 587
User ID: myuser-at-yahoo.com
Password: myyahoopassword

ERROR:-
Port 465 - Error: self signed certificate in certificate chain
Port 587 - Error: read ECONNRESET

YAHOO MAIL
To: myemail-at-yahoo.com
Port: 465 / 587
User ID: myuser-at-gmail.com
Password: mygmailpassword

ERROR:-
Port 465 - Error: self signed certificate in certificate chain
Port 587 - Error: read ECONNRESET

OFFICE MAIL
To: myemail-at-office.com.my
Port: 25 (as my outgoing port on my Microsoft Outlook setting)
User ID: myuser-at-gmail.com
Password: mygmailpassword

ERROR:-
Port 25 - Error: 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:

WHAT I HAVE DONE SO FAR:-
- Turn on "Less Secure App" (google mail)
- Set google mail password with mix character and special char (8 characters)
- Run in Node.js command prompt
  1) npm install nodemailer
  2) npm install  node-red-node-email
  3) npm config set strict-ssl false
  4) npm config set ca ""
       npm install npm -g
       npm config delete ca


- Success to send data to Azure Cloud

- Success to send data to Localhost MSSQL

- Success to write data to file

- Sucess to send message to Twitter

- FAILED TO SEND MESSAGE TO EMAIL


Below are my flow clipboard:-

[{"id":"b61b2d92.12d68","type":"inject","z":"565b4bf3.1557a4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":145.8958282470703,"y":91.88888549804688,"wires":[["f4765eaf.52ad3"]]},{"id":"f4765eaf.52ad3","type":"http request","z":"565b4bf3.1557a4","name":"","method":"GET","ret":"txt","url":"http://finance.yahoo.com/market-overview/","x":136.8958282470703,"y":125.88888549804688,"wires":[["8981d90e.3acc68"]]},{"id":"8981d90e.3acc68","type":"html","z":"565b4bf3.1557a4","name":"","tag":".l84","ret":"html","as":"single","x":152.8958282470703,"y":159.00003051757812,"wires":[["47605e13.bd81f","dd740601.36a398"]]},{"id":"47605e13.bd81f","type":"function","z":"565b4bf3.1557a4","name":"split info to 3 output","func":"//FUNCTION START HERE\nfunction addZero(x,n) {\n    while (x.toString().length < n) {\n        if (n < 3){\n        x = \"0\" + x;\n        }else{\n            x = x + \"0\";\n        }\n    }\n    return x;\n}\n//FUNCTION END HERE\n//DATE START HERE\n//var now     = new Date(); \nvar now = new Date();\nvar year    = now.getFullYear();\nvar month   = addZero(now.getMonth()+1,2); \nvar day     = addZero(now.getDate(),2);\n//DATE END HERE\n//TIME START HERE\nvar hour    = addZero(now.getHours(),2);\nvar minute  = addZero(now.getMinutes(),2);\nvar second  = addZero(now.getSeconds(),2);\nvar millisec  = addZero(now.getMilliseconds(),3); \n//TIME END HERE\n\n//THIS SECTION WILL SEND TO FLOW 1 : SQL SERVER\nvar curr_date = year + '-' + month + '-'+day;\nvar curr_time =  + hour + ':' + minute + ':' + second + '.' + millisec ;\nvar combine_date = curr_date + ' ' + curr_time;\n\nvar arr = msg.payload;\nvar spname1 = \"S&P 500\";\nvar spname2 = \"Dow Jones Industrial\";\nvar spname3 = \"NASDAQ Composite\";\nvar sp1 = arr[0];\nvar sp2 = arr[1];\nvar sp3 =  arr[2];\nvar fullsp1 = spname1 + \": \" + sp1 + \"\\n\";\nvar fullsp2 = spname2 + \": \" + sp2 + \"\\n\";\nvar fullsp3 = spname3 + \": \" + sp3 + \"\\n\";\n\nmsg.payload = combine_date + \":\" + \"\\n\" + fullsp1 + fullsp2 + fullsp3;\nmsg.query = \"INSERT INTO market_performance([dt_DateTime],str_stockprice1,str_stockprice2,str_stockprice3,str_stockname1,str_stockname2,str_stockname3) VALUES('\" + combine_date + \"','\" + sp1 + \"','\" + sp2 + \"','\" + sp3 + \"','\" + spname1 + \"','\" + spname2 + \"','\" + spname3 + \"')\";\n\nmsg2 = {};\nmsg2.topic = \"Performance Market Price\";\nmsg2.payload = msg.payload;\n\nmsg3 = {};\nmsg3.payload = msg.payload;\n\nreturn [msg,msg2,msg3];","outputs":"3","noerr":0,"x":339.8957977294922,"y":159.00003051757812,"wires":[["421fafd7.08522","704e2eb.ae132d"],["ecaf2a9d.15c278","727f761a.52b6b8","a33a9815.5a2178","c72695c2.0a5b78","12115675.21639a"],[]]},{"id":"421fafd7.08522","type":"debug","z":"565b4bf3.1557a4","name":"filtering","active":true,"console":"false","complete":"payload","x":565.8958282470703,"y":166.00002828056472,"wires":[]},{"id":"704e2eb.ae132d","type":"file","z":"565b4bf3.1557a4","name":"text file","filename":"c:\\\\tmp\\marketprice.txt","appendNewline":true,"createDir":true,"overwriteFile":"false","x":565.8958282470703,"y":130.00002828056472,"wires":[]},{"id":"ecaf2a9d.15c278","type":"e-mail","z":"565b4bf3.1557a4","server":"smtp.mail.yahoo.com","port":"465","name":"myyahoo-at-yahoo.com","dname":"yahoo 465","x":575.8957977294922,"y":202.00003051757812,"wires":[]},{"id":"727f761a.52b6b8","type":"e-mail","z":"565b4bf3.1557a4","server":"smtp.office.com.my","port":"25","name":"myoffice-at-office.com.my","dname":"corporate","x":572.8958129882812,"y":252.33340454101562,"wires":[]},{"id":"dd740601.36a398","type":"debug","z":"565b4bf3.1557a4","name":"after select","active":true,"console":"false","complete":"true","x":311.8957977294922,"y":116.11123657226562,"wires":[]},{"id":"a33a9815.5a2178","type":"e-mail","z":"565b4bf3.1557a4","server":"smtp.gmail.com","port":"465","name":"mygmail-at-gmail.com","dname":"google 465","x":580.8958129882812,"y":304.888916015625,"wires":[]},{"id":"c72695c2.0a5b78","type":"e-mail","z":"565b4bf3.1557a4","server":"smtp.mail.yahoo.com","port":"587","name":"myyahoo-at-yahoo.com","dname":"yahoo 587","x":702.8958129882812,"y":201.888916015625,"wires":[]},{"id":"12115675.21639a","type":"e-mail","z":"565b4bf3.1557a4","server":"smtp.gmail.com","port":"587","name":"mygmail-at-gmail.com","dname":"google 587","x":712.8958129882812,"y":304.888916015625,"wires":[]}]


Does anyone know what is lack in here? My step or nodes or flow? I have try both office internet connection (control by WatchGuard) and my own phone internet hotspot (full access) but same result: FAILED

Need advance advise.

Luiey

unread,
Apr 18, 2016, 4:55:36 AM4/18/16
to Node-RED
What a long question posting here while a reason for this is just one thing! Very shame.. I need to disable my antivirus (Avast) since I found out after send email from my corporate mail to my gmail, I seen a word "Virus-free. www.avast.com" and after trying to disable it, all mail are successfully send using 465 port..what a painful solution to accept over the failed result.
...

Dave C-J

unread,
Apr 18, 2016, 5:04:02 AM4/18/16
to node...@googlegroups.com
:-) - welcome to Monday morning !

ramkumar lakshminarayanan

unread,
Apr 22, 2017, 3:29:14 AM4/22/17
to Node-RED
Yes, this worked for me, i disabled antivirus for some time and it worked
Reply all
Reply to author
Forward
0 new messages