Can send email with 2xrsc or 2xbackup?

Hi,

Question1:
It’s possible to send emails with 2x.rsc files or 2x.backup? or 1rsc&1backup?


Question2:
It’s possible to send email with 1 .rsc printed in the body email? How?



Thanks,

something like

:local myvar [/file get myfile.rsc contents]
/tool e-mail send body=("here's my body: ".$myvar)

?

Hi,

Thanks 4 reply.

/file get myfile.rsc contents

this don’t show me the file contents. I use ROS 3.28. : /

wrong way =) I’m on 3.28 too

:put [/file get myfile.rsc contents]

Hi,

I can’t make this work.

[admin@MikroTik] > export file=a.rsc
[admin@MikroTik] > :put [/file get a.rsc contents]        

[admin@MikroTik] >

My script:

:local myvar [:put [/file get a.rsc contents]]
/tool e-mail send server=[:resolve smtp.gmail.com]  subject="$[/system identity get name] $[/system clock get time] $[/system clock get date] Backup .backup" to=xxxxxxxx@gmail.com from="xxxxxxxx@gmail.com" user="xxxxxxxxxxxx@gmail.com" password=xxxxxxxxx body=($myvar) file=test.backup;

: ?

yesss, checked… it works only for small files (<4KiB?)

as far as I remember, it’s limitation on RouterOS script string data type…

Thanks Chupaka!

Then.. let’s see if anyone can help me with printing the rsc in the mail body..

Now I send 2 diferent emails, 1 with the .backup and 1 with the rsc… but it could be better if I send the 2 in one email.

Aps…


this don’t work:

body=([/export])

xD

it’s still 4K limit on string data type, I believe… try something short, like

body=([/interface export])