Populating email BODY with output of "/print"

Trying to do this:

/tool e-mail send tls=yes to="someone@somewhere.com" subject="Current 172.30.6.0s-IN_USE" body="$[/ip firewall address-list print without-paging where list=172.30.6.0s-IN_USE]"

Email comes through fine but BODY is empty. Instead, the printed output is sent to the console.

How can I get the print output into the email BODY?

Thanks,
Scott

Here is an example from one of my routers that works:

send to=mail@domain.com subject="AP down" body="AP down.\r\n\r\nProblem found on $[/system clock get date] at $[/system clock get time]"

i think you should use get instead of print

You can’t gept print output in email body. What you can is print to file and attach file to the email.

@deejayq - “get” works great, but how do I get all the entries in a list? I’m assuming some “for” loop?

@mrz - That’s what I have been doing, but i’m tired of having to open an attachment on my phone when the message arrives.

Thanks,
Scott