Can't Send on email. Blynk Local Server

First time setting up a local server on my raspberry pi 3, I got it up and running but am getting an error when sending an email token:

Unable to send email. Please check your network connection

I have followed the instruction on putting mail.properties and generated a password using a App Password on gmail.

I have also tried to send a CSV file to my email but it didnt work at all.

Here’s my mail.properties:

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

Where xxxxxx is my gmail
And yyyyyyy is the generated password of my Gmail using App Password

I hope someone will respond

Please, check:

NOTE : you’ll need to setup Gmail to allow less secured applications…

1 Like

I have already setup the Gmail to allow less secured app

Have a look at

Doing some searching in this forum if you still have more issues.

First time setting up a local server on my raspberry pi 3, I got it up and running but am getting an error when sending an email token:

Unable to send email. Please check your network connection

I have followed the instruction on putting mail.properties and generated a password using a App Password on gmail.

I have also tried to send a CSV file to my email but it didnt work at all.

Here’s my mail.properties:

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=xxxxxxxxx@gmail.com
mail.smtp.password=yyyyyyyyyyyy
mail.smtp.connectiontimeout=30000
mail.smtp.timeout=120000


Where xxxxxx is my gmail Username
And yyyyyyy is the generated password of my Gmail using App Password


Here’s my server.properties:

server.host=192.168.0.169
contact.email=xxxxxxxxx@gmail.com
  admin.email=xxxxxxxxx@gmail.com
  admin.pass=waterpumplrc
allowed.administrator.ips=192.168.0.169/24
http.port=8080
https.port=9443
logs.folder=/home/pi/Blynk/logs/
enable.db=true
log.level=info
restore.host=blynk-cloud.com
hardware.mqtt.port=8440
listen.address=
product.name=Blynk
csv.export.data.points.max=43200
allow.store.ip=true
force.port.80.for.csv=false
initial.energy=100000

Here’s the Log:

15:45:22.651 INFO - Using data dir '/home/pi/Blynk'
15:45:25.825 INFO - Region : local. Host : 192.168.0.169.
15:45:28.213 INFO - Initializing gmail smtp mail transport. Username : xxxxxxxx@gmail.com. SMTP host : smtp.gmail.com:587
15:45:28.531 INFO - Reports : 0
15:45:28.533 INFO - Didn't find custom user certificates.
15:45:28.540 INFO - Didn't find Let's Encrypt certificates.
15:45:28.540 INFO - Automatic certificate generation is turned ON.
15:45:28.541 WARN - ATTENTION. Server certificate paths (cert : '/root', key : '/root') not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
15:45:35.555 INFO - HTTP API and WebSockets server listening at 8080 port.
15:45:35.564 INFO - HTTPS API, WebSockets and Admin page server listening at 9443 port.
15:45:35.570 INFO - Mqtt hardware server listening at 8440 port.
15:45:35.648 INFO - Starting up certificate retrieval process for host 192.168.0.169 and email xxxxxxxx@gmail.com.
15:45:40.377 INFO - xxxxxxxxx@gmail.com Blynk-app (android-22712) joined.
15:45:56.183 ERROR- Error sending email auth token to user : xxxxxxxx@gmail.com. Error: Couldn't connect to host, port: smtp.gmail.com, 587; timeout 30000

I hope someone will respond

Anyone?

I’ve merged your two topics together, as they appear to be about the same issue.
You’ve received some good advice in the initial topic, to which you haven’t responded - other than to create a new topic on the subject.

Keeping everything together helps community members see what advice has already been given, and your feedback on that advice.

Pete.

I know it’s a long time since this thread started, but this may help someone. When you start a project the legacy app will give you the choice to email you a token to your gmail account or simply copy it. Just copy it and send it to yourself on whatever mail server you use then paste it into your sketch… or you can do the long horrible fight with google to get the third party app password. This is much simpler.
Hope it helps.

Obtaining the Auth token isn’t really an issue with local server, as it’s easy enough to copy it from the admin console.

The real issue is the lack of being able to send email notifications and email report download links now that Gmail has removed the “allow less secure apps” functionality.

Pete.

thanks for that Pete. I guess the only way is to suffer through the google hoops of having to turn on two part sign ins, apply for the app specific password, then turn off the two part sign in. Too bad there isn’t a way of working around being limited to having to use gmail.