Unable to send testmail

HJvD6 years ago

Hi,

tried sending a test mail and got this in the log.

2017-01-13 07:46:40  WARN: Unable to find resource 'test.vm' - ResourceNotFoundException (... < NotificationFormatter:51 < NotificationMail:109 < NotificationResource:66 < ...)

Running Traccar 3.9. What to do?

Anton Tananaev6 years ago

You should be looking at the service call response, not log file.

HJvD6 years ago

Sorry, but where can I find that information?

Anton Tananaev6 years ago

If there was an error, it would show a dialog. If there was no dialog, it means that email was successfully sent.

HJvD6 years ago

OK,

this is strange. No notification after sending the email, so the mail is send. The warning in the log file and no email send.

These are the lines I added to traccar.xml

    <entry key='mail.smtp.host'>mail.myhost.nl</entry>
    <entry key='mail.smtp.port'>465</entry>
    <entry key='mail.smtp.ssl.enable'>true</entry>
    <entry key='mail.smtp.username'>alarm@mydomain.nl</entry>
    <entry key='mail.smtp.starttls.enable'>true</entry>
    <entry key='mail.smtp.from'>alarm@mydomain.nl</entry>
    <entry key='mail.smtp.password'>mypassword</entry>

Any ideas on this?

Anton Tananaev6 years ago

Have you checked your email server logs?

HJvD6 years ago

Good point! Checked both the web usage log and the error log. No notifications what soever. So I think nothing is send... The email account is verified and working though.

HJvD6 years ago

OK, getting somewhere. Remembered that I read somewhere that after changing the config file you have to stop en start the server. After I did this I tried sending another testmail. Nou I get a error notification. It says: NullPointerExeption (...NotificationMail:69<*:NotificationResource:66<...)

Anton Tananaev6 years ago

Looks like you are missing "mail.smtp.auth" parameter in the config.

HJvD6 years ago

Correct. Switched to the attributes settings for more easy switching my mail settings. Same problem here. No failure notification after pushing the test-mail button and no testmail arriving.

Anton Tananaev6 years ago

Check network call response in the browser console.

HJvD6 years ago

Found the solution. I made a special email account for alarms from Traccar in my domain. The email address that I filled in in my user account was another address. It seems that both email addresses, from the user account and in the settings, have to be the same.

However no failure notification after sending the test email with this wrong setting. Would be nice if a failure notification was build in.

Anton Tananaev6 years ago

They don't have to be the same. There must be something with your SMTP server or config.

HJvD6 years ago

Can't think of what is wrong. All the config files in Traccar are default now, as in: they are the same as they were right after installation. Using the same email address was the only way for me to send my testmail. Do you want me to explore something?

Anton Tananaev6 years ago

As I said before, you should check the network call response.