Gmail email for notifications change link

Track-trace4 years ago

I am testing gmail email for notifications. It works.

I am receiving the notification emails which are send to my server admin email address (through gmail setup in traccar.xml)

I noticed that the link to the event in the email shows http://127.0.1.1:8082?eventId=27101
I wonder how can i change this in the file below to point to the external ip (example: http://123.123.123.123 or http:/domainname.com ?

Within the email i see this message.

Device: devicetracker3
Online
Time: 2021-12-06 23:14:31
Link: http://127.0.1.1:8082?eventId=27101 

I see that the templates reside in /templates/full/deviceOnline.vm

#set($subject = "$device.name: online")
<!DOCTYPE html>
<html>
<body>
Device: $device.name<br>
Online<br>
Time: $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)<br>
Link: <a href="$webUrl?eventId=$event.id">$webUrl?eventId=$event.id</a>
</body>
</html> 
Anton Tananaev4 years ago

You can configure your external server URL using web.url config parameter.

Track-trace4 years ago

Ah, great, added that config parameter in traccar.xml

Now it works, thank you Anton.