SMTP config for notifications?

tamati8 years ago

If I want to config mail to use gmail smtp do I just add the following to the config file:

    <entry key='mail.smtp.host'>smtp.gmail.com</entry>
    <entry key='mail.smtp.port'>465</entry>
    <entry key='mail.smtp.ssl.enable'>true</entry>
    <entry key='mail.smtp.from'>tamati@gmail.com</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>tamati@gmail.com</entry>
    <entry key='mail.smtp.password'>tamati</entry>

I have enabled the notifications for mail and web. I get the web notification pop up but I don't know how to check if setup is right for mail.

abyss8 years ago

Yes, you just need to add this to config.

Actually, there are no checks if it is right, only errors will appear in log if something wrong.

pmlewisuk8 years ago

Hi

I've added the following in the config and enabled notifications send via web and mail. notification appear on web but not email.

I know the user / password is correct, using gmail.

<!-- EMAIL SETTINGS -->
<entry key='mail.smtp.host'>smtp.gmail.com</entry>
<entry key='mail.smtp.port'>465</entry>
<entry key='mail.smtp.ssl.enable'>true</entry>
<entry key='mail.smtp.from'>traccar@XXXXXXXXXX.org.uk</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.username'>traccar@XXXXXXXX.org.uk</entry>
<entry key='mail.smtp.password'>password</entry>

Please help, what logs do I look at?

Thanks

Mark

Anton Tananaev8 years ago

You should look at the "tracker-server.log".

pmlewisuk8 years ago

Sorted thanks thanks to the data in the log

Some apps and devices use less secure sign-in technology, which makes your account more vulnerable. You can turn off access for these apps, which we recommend, or turn on access if you want to use them despite the risks.

https://support.google.com/accounts/answer/6010255?hl=en-GB

markus8 years ago

Hello friends out there!

I played now the whole day long with the following problem. I am using an account from the Telekom-Austria which does not support SSL for outgoing mails. The following message was shown within the tracker-server.log.

2016-11-01 15:45:26 WARN: Could not convert socket to TLS - MessagingException (... < NotificationMail:135 < *:149 < ...)

After trying countless possibilities of ports and other settings written in this forum I solved the problem by removing (!!!) this line from the traccar.xml
<entry key='mail.smtp.starttls.enable'>true</entry>

By the way, the hint which helped me finally can be found here:
http://stackoverflow.com/questions/12743846/unable-to-send-an-email-using-smtp-getting-javax-mail-messagingexception-could

So finally my config looks like this:

<!-- EMAIL SETTINGS -->

<entry key='mail.smtp.host'>smtp.a1.net</entry>
<entry key='mail.smtp.port'>25</entry>
<entry key='mail.smtp.from'>traccar@aon.at</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.username'>USER/entry>
<entry key='mail.smtp.password'>PASSWORD</entry>

Enjoy ... yours
markus

SooriSh7 years ago

Anton, am not able to see smtp settings in traccar.xml or default.xml.
Can you please help me know where to find smtp mail settings ?

Anton Tananaev7 years ago

You need to add them to traccar.xml file. They are not there by default.

suraj shrestha7 years ago
    <entry key='mail.smtp.host'>smtp.example.com</entry>
    for STARTTLS
    <entry key='mail.smtp.port'>587</entry>
    <entry key='mail.smtp.starttls.enable'>true</entry>
    for SSL
    <entry key='mail.smtp.port'>465</entry>
    <entry key='mail.smtp.ssl.enable'>true</entry>
    <entry key='mail.smtp.from'>traccar@example.com</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>traccar@example.com</entry>
    <entry key='mail.smtp.password'>password</entry>

I have added this on my config file but at sudden the server just stopped to work any ideas ... what to do ? the logs shows all the device been disconnected

Anton Tananaev7 years ago

If you added it exactly like you put it in your post then it's obviously won't work. You need to select appropriate parameters depending on whether you are using SSL or STARTTLS.

Someone helps me set up the geofence reports on my traccar server.

vlladik6 years ago

Добрый день.
Установил traccar-windows-64-4.3 но не как не могу найти где находится файлик с настройками почты. и еще хотелось бы видеть дату регистрации пользователя
Спасибо

Himanshu Joshi5 years ago

How will I send email to the user on geofence exit event??