Can't get email to work

jf2 years ago

So everything is running fine but I tried to setup email and it won't send:
error in tracker-server.log:

 WARN: Email report failed - Connection timed out - ConnectException (... < SmtpMailManager:152 < ReportMailer:58 < ...)

my smtp:

<entry key='mail.smtp.host'>mail.infomaniak.com</entry>
<entry key='mail.smtp.port'>465</entry>
<entry key='mail.smtp.ssl.enable'>true</entry>
<entry key='mail.smtp.from'>myemailadress</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.username'>myemailadress</entry>
<entry key='mail.smtp.password'>mypassword</entry>
Track-trace22 years ago

Meaby this line

<entry key='mail.smtp.starttls.enable'>true</entry>

instead of

<entry key='mail.smtp.ssl.enable'>true</entry>
jf2 years ago

my email host says 465, and I just tried, same result.

Anton Tananaev2 years ago

Either there's some problem with your email server or some configuration details are incorrect, but I'm not sure how we can help with either of those issues.

jf2 years ago

Previously i tried adding it globally to "traccar.xml" this did not work. But the same configuration works when adding it as attributes to a user.

Anton Tananaev2 years ago

They work exactly the same no matter where you add, so there must be some other thing you missed.

Turbovix2 years ago

Are you sure your VPS is not blocking traffic on port 465?

jf2 years ago

i disabled the firewall for a short while to test if that was the problem and it didnt have an effect, but I solved my problem. I couldn't set it up globally but when i set it up for each user it works and thats good enough for me.

Anton Tananaev2 years ago

Maybe you had a password with a special character? Remember that you need to escape any special characters because it's an XML file.