Mail problems with gmail config.

Alf-DK4 years ago

I get a popup that says (Communication failure) when I send an event test, but can not figure out why.
Have read several threads in here to find a solution but did not succeed.

uses latest version of traccar with H2 database
Config file is as follows

<entry key = 'mail.smtp.port'> 465 </entry>
<entry key = 'mail.smtp.starttls.enable'> true </entry>
<entry key = 'mail.smtp.host'> smtp.gmail.com </entry>
<entry key = 'mail.smtp.from'> xxxx@gmail.com </entry>
<entry key = 'mail.smtp.auth'> true </entry>
<entry key = 'mail.smtp.username'> xxxx@gmail.com </entry>
<entry key = 'mail.smtp.password'> app code </entry>
Anton Tananaev4 years ago

Why not use the recommended config?

https://www.traccar.org/gmail/

Alf-DK4 years ago

I also started with that, but since I have not got that part to work with making a secure connection, I had to use port 465 otherwise I got an error message:

Connection reset - SocketException
(... <MailManager: 139 <*: 92 <NotificatorMail: 34 <NotificationResource: 63 <...)
Anton Tananaev4 years ago

Port 465 is usually SSL and port 587 uses STARTTLS. Are you sure you are configuring it correctly? Can you please provide a reference to the Gmail doc as a confirmation.

Alf-DK4 years ago

I Just fixed the config so it is exactly like the one you made here on the page to start from scratch, but still gets (Communication failure)

Anton Tananaev4 years ago

That probably means that you have issue with connection to the Google server. I would recommend debugging the code.

Alf-DK4 years ago

OK. I get another one for that, because I can not do it myself.
Thanks for the help.