Traccar Mail notifications

tamati 9 years ago

I am still not receiving mail notifications.

I done the following:
added mail config

    <entry key='mail.smtp.host'>mail.example.com</entry>
    <entry key='mail.smtp.port'>25</entry>
    <entry key='mail.smtp.ssl.enable'>true</entry>
    <entry key='mail.smtp.from'>traccar@example.com</entry>

I tested ran cmd and did below telnet command:
telnet mail.example.com 25

Got successful connection. I then restarted the Traccar service and still not receiving any mail notifications. Am I missing something??

tamati 9 years ago

Below is from wrapper.log file:

INFO   | jvm 1    | 2016/08/01 13:34:30 | Exception in thread "Thread-3090" java.lang.NullPointerException
INFO   | jvm 1    | 2016/08/01 13:34:30 | 	at java.util.Hashtable.put(Unknown Source)
INFO   | jvm 1    | 2016/08/01 13:34:30 | 	at org.traccar.notification.NotificationMail.getConfigProperies(NotificationMail.java:61)
INFO   | jvm 1    | 2016/08/01 13:34:30 | 	at org.traccar.notification.NotificationMail.sendMailSync(NotificationMail.java:107)
INFO   | jvm 1    | 2016/08/01 13:34:30 | 	at org.traccar.notification.NotificationMail$1.run(NotificationMail.java:138)
INFO   | jvm 1    | 2016/08/01 13:34:30 | 	at java.lang.Thread.run(Unknown Source)
Anton Tananaev 9 years ago

Are you really trying to use "mail.example.com" as your mail server? You need a valid mail server. Also, most likely you need to provide authentication to be able to send anything.

tamati 9 years ago

Hi Anton, yes I do have a valid mail server. just for the sake of the question i just used fake name. I have tested using telnet and message was sent and recipient received successfully. I didn't put in an entry key for authentication. The admin said I won't need authentication for the mail address I am using. So Now I have just made the entry for username and password blank. Now I don't get that error message in my wrapper.log file but I am still not getting the mail notification either. Anything else I can check??

tamati 9 years ago

I tried using my own email address as sender and put in the authentication details and still failed, found below error in tracker-server text file. I even tried to use the sender address which admin provided with blank password and still receive this same error.

2016-08-02 11:58:33  WARN: 535 5.7.0 authentication failed
 - AuthenticationFailedException (... < NotificationMail:124 < *:138 < ...)
2016-08-02 11:58:33  WARN: 535 5.7.0 authentication failed
 - AuthenticationFailedException (... < NotificationMail:124 < *:138 < ...)
abyss 9 years ago

Hello, tamati
back to first version of config, is SSL obligatory parameter? did you try without it?

tamati 9 years ago

Ok with the first version I removed the ssl parameter restarted the service and i get the below error which is the same as first error I got:

INFO   | jvm 1    | 2016/08/03 09:11:24 | Exception in thread "Thread-27" java.lang.NullPointerException
INFO   | jvm 1    | 2016/08/03 09:11:24 | 	at java.util.Hashtable.put(Unknown Source)
INFO   | jvm 1    | 2016/08/03 09:11:24 | 	at org.traccar.notification.NotificationMail.getConfigProperies(NotificationMail.java:61)
INFO   | jvm 1    | 2016/08/03 09:11:24 | 	at org.traccar.notification.NotificationMail.sendMailSync(NotificationMail.java:107)
INFO   | jvm 1    | 2016/08/03 09:11:24 | 	at org.traccar.notification.NotificationMail$1.run(NotificationMail.java:138)
INFO   | jvm 1    | 2016/08/03 09:11:24 | 	at java.lang.Thread.run(Unknown Source)
abyss 9 years ago

Please try this build https://cloud.mail.ru/public/9cAC/P9si8AjjF

It is almost clean 3.6 (8d5b4ec5ec) with all last fixes in NotificationMail and applied #2187

tamati 9 years ago

SUCCESS!!!!!!!!
I am now getting mail notifications.

Fix:
Replaced the old tracker jar file with the one you provided.
Used mail config below:
<entry key="mail.smtp.host">mail.<example>.net.ck</entry>
<entry key="mail.smtp.port">25</entry>
<entry key="mail.smtp.from">traccar@<example>.com</entry>

Thank you so much for Traccar and your help Abyss and Anton.

Cheers

Turbovix 9 years ago

Dear, what place this setting should be done? It is for interface or configuration file?
Thank you!

abyss 9 years ago

Hello, Turbovix
Actually, both. Config will work for all, user attributes will work only for that user.
Second column https://www.traccar.org/configuration-file/ shows the possible places for all parameters.

Turbovix 9 years ago

@Abyss Thanks for the support, it worked, very good!

Turbovix 9 years ago

@tananaev, you need to control spam, since my email box is full of VerkaDori user's message
Thank you

Anton Tananaev 9 years ago

Sorry about that. I'll see what I can do.

Rajesh 9 years ago

Hi,

i want to notify if traccar is stop / start working.

please solve this problem