I was getting console messages like this:

An error occurred while sending a message to ADMINISTRATOR.

The message alias could not be found on the network.

More help is available by typing NET HELPMSG 2273.

Found that if I changed this line:

run "net send $rcpt $msg"

to this:

shell "cmd /c net send $rcpt $msg >nul 2>nul"

then the messages went away.