help:email send

hej
In ip firewall address-list I have list name spam with a number of items. I will like to have en email for each item. I have tried with this
:foreach i in ([/ip firewall address-list find list=spam] do=(/tool e-mail send to=myname@myaddress.dk))

Try this:

:foreach i in (/ip firewall address-list find list=spam) do={
/tool e-mail send to=myname@myaddress.dk from=noreply@youraddress.dk server=your.SMTPserver.ip.addres subject=“Subject Line Here” body=“Inser your message body”
}

Hope that helps!

hej’
Thank you for your help, but I think the problem is in this part.
:foreach i in [/ip firewall address-list find list=spam]

I’ve tested by putting three address list entries called ‘spam’ into my address lists.

If I run this line

:foreach i in=[/ip firewall address-list find list=spam] do={ :put $i }

It correctly returns the three index values.
You seem to have missed an “=” after “in”

Hope it works now…

-Krige

Hej
Thanks for your help, it works now

Erik