Thanks for your insight. All those settings are correct and I have tried everything you suggested before posting this thread.
Oddly enough the e-mail function works as I stated, when using the posted script commands from the command line, but not from the script function. Also I have one additional script that works fine e-mail wise, the difference is that it is a exported backup script and I believe it has to do with the file extension descriptor size. A backup file is as follows ‘file name’.backup whereas a script backup or export is ‘file name’.rsc I just thought that more people would have run into this issue. Will see if Mikrotik support has a reason for the failure.
Check policies of your script. Perhaps backup file is not fully generated before the attempt to send it. Try to add short delay in between generating backup and sending the file.
/system backup save name=([/system identity get name]);
/delay delay-time=5s ;
/tool e-mail send to= "me@me.com" subject=([/system identity get name] . " Backup") file=([/system identity get name] . ".backup")
Thanks, did that and had no effect. I wonder if it has to do with the length of the extension because I use the basic same script for generating a backup script.
/export file=([/system identity get name]); /tool e-mail send to= “me@me.com” subject=([/system identity get name] . " rsc") file=([/system identity get name] . “.rsc”)
This script runs with the same permissions and never has the problem that the backup script does. This one is created about 1 min after the backup and e-mailed about one minute after the backup attempts to. This never!!! fails. The other always!!! fails. the only difference is the length of the extension (3 characters vs. 6 characters). I am truly surprised no one else has this issue. I have tried the sample scripts on the wiki and the same issue. Running routeros 3.30 & 4.x. Prior to upgrading to 3.30 to resolve some other issues, we ran 3.6 and it always worked fine.
I solved this issue on my router board by creating two separate scripts
the first: /system backup save name=([/system identity get name])
then the second script : /tool e-mail send to= “test@test.com” subject=([/system identity get name] . " Backup") file=([/system identity get name] . “.backup”)
I then used system scheduler to run the scripts, starting with the backup script and then 5mins later the "send email script.
I was able to make it work . But now I have over 300 devices that need updating. It is not cool to have OS updates destroy previously working scripts and features without maintaining consistency!!