Local server with e-mail time-out error (solved)

Successfully built a local server and a project running on it that sent me an e-mail under certain conditions. Worked great, and I went to clone the SD card for a second Raspberry Pi. Cloning utility corrupted the card and I had to rebuild from scratch. Thought I had done everything correctly:

mail.properties file (in same file area as server (server-0.28.4-java8.jar), with 777 properties):

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=strauch1@gmail.com
mail.smtp.password=XXXXXXXX

Log file:

14:14:23.169 ERROR- Error sending email from hardware. From user strauch1@gmail.com, to : strauch1@gmail.com. Reason : Couldn’t connect to host, port: smtp.gmail.com, 587; timeout -1
14:15:36.890 INFO - strauch1@gmail.com Blynk-app joined.
14:15:38.962 INFO - strauch1@gmail.com Blynk-app joined.
14:15:45.440 INFO - strauch1@gmail.com Blynk-app joined.
14:16:08.965 WARN - User not logged. /192.168.1.105:53175. Closing.
14:16:09.895 INFO - strauch1@gmail.com Blynk-app joined.
14:16:14.903 INFO - strauch1@gmail.com Blynk-app joined.
14:17:02.788 INFO - strauch1@gmail.com Blynk-app joined.
14:18:02.515 ERROR- Error sending email from hardware. From user strauch1@gmail.com, to : 925XXXXXXX@vtext.com. Reason : Couldn’t connect to host, port: smtp.gmail.com, 587; timeout -1

I thought I covered everything, but it appears I must have missed a crucial step somewhere and I am baffled.

Any chance port 587 is blocked on your server? Maybe firewall?

Well, I can send e-mail from my laptop on my home network without issue. When I had it running before, I did not have to manipulate any port settings on my router for it to be successful. I feel I have somehow misconfigured my local server in some way that is eluding me.

Dmitriy, Blynk is an awesome approach and has totally changed my thinking regarding IOT and home automation. Thank you so much, and I am sure I will get this problem solved one way or another.

Problem has been solved, and I apologize for using bandwidth on the community board.

Initially I had the Pi running wirelessly on my internal network, and e-mail worked fine. After the SD card debacle, I rebuilt the system and hard-wired the Pi on to my network. My failure was to not properly configure the ethernet interface in the OS.

2 Likes

No problem. We are all here to help each other :wink:. Thanks for update.