This is weirdā¦ Iām sure this worked at one time.
I have the BLYNK server (latest version) running on a Raspberry Pi. All is well.
BUT it wonāt send me an email.
So - if I go to a terminal in the PI and use the command line mail program - it sends me email no problem. Iāve set up the SMTP program with my gmail details and all works a treat.
Hereās what Iāve put in the mail.properties file - which is in the same directory as the other BLYNK stuff (with 777 permission)
So the logs did not seem as if theyād been updated for while but were quite big from experimenting. So I deleted logs/blynk.log and logs/users/pete@scargill.org.log.
They didnāt come back to I rebooted the Raspberry Pi hosting BLYNK. All is working (except for the email) but neither of these logs appear to be re-creating.
So I guess the first questions are - how do I get the two files to recreate and is that deliberate or a bug that they are not being recreated? (yes, Iāve hit refresh - definitely not there)
So as you can see - the logs SHOULD be getting created/recreated in /var/blynk.
Iāve just opened the app, turned a light on and off, tried and failed to send myself an email andā¦
No Blynk log and no email logā¦ I wondered it logging out of and into the app might affect this - no - still no logs.
I did that - I resrtarted the whole Raspberry Pi - and just to confirm - the /var/blynk directory and those below it have 777 privilege - there is no reason that the logs should not be recreated that I can see.
I suppose you are using āserver.jarā to run server. If it is so then you should edit mail.properties included in the .jar archive. Mine working fine after i did the same.
Hi Dmitriy
I got the same problem, the local server canāt send out emails.
Here is blynk.log
===============================BEGIN OF LOG============================================
2017-02-05 18:03:59.525 INFO - Using data dir ā/opt/Bdataā
2017-02-05 18:03:59.719 INFO - Region : local
2017-02-05 18:03:59.994 INFO - Initializing gmail smtp mail transport. Username : auth@sunplant-mis.com. SMTP host : smtp.exmail.qq.com:465
2017-02-05 18:04:00.260 WARN - Found server certificates but no client certificate for ā/opt/blynk-serverā path. Using one way ssl.
2017-02-05 18:04:00.353 INFO - Hardware plain tcp/ip server listening at 8442 port.
2017-02-05 18:04:00.353 INFO - Hardware SSL server listening at 8441 port.
2017-02-05 18:04:00.353 INFO - Application server listening at 8443 port.
2017-02-05 18:04:00.354 INFO - HTTP API server listening at 8080 port.
2017-02-05 18:04:00.354 INFO - HTTPS API server listening at 9443 port.
2017-02-05 18:04:00.355 INFO - HTTPS Admin UI server listening at 7443 port.
2017-02-05 18:04:00.355 INFO - Web Sockets server listening at 8082 port.
2017-02-05 18:04:00.355 INFO - Web SSL Sockets server listening at 8081 port.
2017-02-05 18:04:00.355 INFO - Mqtt hardware server listening at 8440 port.
2017-02-05 18:04:23.834 INFO - marketing@sunplant-china.com Blynk-app joined.
2017-02-05 18:07:58.288 WARN - No order field āidā
2017-02-05 18:08:27.539 WARN - No order field āidā
2017-02-05 18:08:32.901 WARN - No order field āidā
2017-02-05 18:55:02.246 ERROR- Error sending email from application. From user marketing@sunplant-china.com, to : marketing@sunplant-china.com. Reason : Exception reading response
==================================END OF LOG==========================================
here is mail.properties
=================================BEGIN OF FILE==========================================
mail.smtp.auth=true
mail.smtp.starttls.enable=true mail.smtp.host=smtp.exmail.qq.com
mail.smtp.port=465 mail.smtp.username=auth@sunplant-mis.com
mail.smtp.password=xxxxxxxxxxxxxxx
and I have some questions
Does blynk only support gmail SMTP server?
How to specify the SSL or TLS etc.
if there is any debug mode can give more information to help solve the problem plz let me know thx.
Hi Dmitriy I had figure out the problem,
I switch another mail server use normally smtp protocol with 25 port,
then the mail system is working correctly. after I switch back and use smtp with 25 port and set
mail.smtp.starttls.enable=false every mail was sent immediately.
Like you said maybe this mail server need some additional options or other parameters.
Sending mail is an important procedure in blynk I purpose add more parameters in it