Community discussions

MikroTik App
 
Cliff007
just joined
Topic Author
Posts: 11
Joined: Tue Feb 23, 2021 9:22 pm

Emailing of Log file not working after latest update

Sun Mar 23, 2025 2:27 pm

Hi,

I am no by no means an expert but set my Mikrotik up with the help of this Forum several years ago. Everything has worked great until the latest update.

I had a script that send a daily email log, since the update this has stopped working. I am getting the following error:-

(scheduler:Log File) input does not match any value of file (/tool/e-mail/send (file); line 3)

My script is:-

/log print file=logs
delay 10
/tool e-mail send from="xxxxx@xxxxxxxx.co.uk" to=xxxxx@xxxxxxxxxx.co.uk subject="$[/system identity get name] Log" \
body="$[/system clock get date] log file" file=logs
delay 10
/file remove logs

I am running version 7.18.2

Thanks in anticipation, Cliff
 
biomesh
Long time Member
Long time Member
Posts: 575
Joined: Fri Feb 10, 2012 8:25 pm

Re: Emailing of Log file not working after latest update

Mon Mar 24, 2025 1:56 am

On the /tool email command, put the file name in quotes.
 
Cliff007
just joined
Topic Author
Posts: 11
Joined: Tue Feb 23, 2021 9:22 pm

Re: Emailing of Log file not working after latest update

Mon Mar 24, 2025 3:18 am

On the /tool email command, put the file name in quotes.
Thanks for the reply, I have tried putting the quotes in, but I might be having a 'thick' moment but I still can't get it to work.
Can me show me where you would put them?
 
ConradPino
Member
Member
Posts: 481
Joined: Sat Jan 21, 2023 12:44 pm
Location: San Francisco Bay
Contact:

Re: Emailing of Log file not working after latest update

Mon Mar 24, 2025 8:21 am

Showing what you tried is useful even if it fails.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 13028
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Emailing of Log file not working after latest update

Mon Mar 24, 2025 3:38 pm

the filename is logs.txt, it is more than obvious that if only logs are written it does not work.

(the script has a lot of errors, I only highlight the part about quotes and file name)
/log print file="logs.txt"
delay 10
/tool e-mail send from="xxxxx@xxxxxxxx.co.uk" to=xxxxx@xxxxxxxxxx.co.uk subject="$[/system identity get name] Log" \
body="$[/system clock get date] log file" file="logs.txt"
delay 10
/file remove "logs.txt"