would you be able to paste what you tested? (just changing email address and server of course)
I’ve tried this on 3 different boxes now with no luck. (3.11, 3.13, 3.13)
also- turn on packet sniffer for port 25 and see whats actually being send/received. You’ll probably find that the receiving server is rejecting it, and the error you are seeing isn’t correct.
Mine is ok. My /tool e-mail settings are correct, so I don’t need the “from” or “server” parameters.
[admin@test] /system script> /tool e-mail send to=“myemail@mydomain.com” subject=“test” body=“testing”
and it went right through from both RB333/V3.11 and RB433AH/V3.13
tried with quotes and without, using a variable and using a direct name, can’t see any port 25 connections from the MT when doing a torch, nor on the remote mailserver.
Is running on a powerrouter 732, will try a downgrade and upgrade to see if it makes any difference.
is your output firewall chain blocking it ? turn on packet sniffer on the internet facing interface and select only port 25. torch will make it hard to see if its too fast.
trust me, the ONLY way you will know is to watch the actual SMTP conversation happen. The RouterOS errors for email do not correspond to what is actually happening. Use packet sniffer or review the mta logs directly. The smtp client is NOT very flexible, the server has to give it carte blanche : )
Oh, sorry. I thought getting it in my email box was good enough.
ADD: If you are still having challenges, try a delay between them. I have noticed the “execute” command is not what I thought. I expected the called script would complete before my routine would continue. NOT!! They run as a fork, not as a subroutine. Maybe same here?
I just tried this:
/tool e-mail send to=“badmail” subject=“test” body=“test”
and sure enough, I got the log entry. It must be an address formatting error to generate that message.
I tried a bogus email with a good format, and my box sent it, but the email server sent me a “nasty-gram” about it after the fact.
10:52:07 system,e-mail,error Error sending e-mail: invalid TO address
10:52:32 system,e-mail,error Error sending e-mail: invalid TO address
10:52:35 system,e-mail,error Error sending e-mail: invalid TO address
/me tries another email server
email goes
…
Checking with torch helped to see what was actually being sent out, but yeah the TO address message is a bit deceptive :-/
I’ll work more on it and figure out what the problem is (perhaps my routing to that mailserver is a fault) thanks guys.