The error is 2147746321.
I can see in the mailserver log that it tries, but the connection gets closed.
Wed 2012-10-10 15:55:25: Session 990590; child 1
Wed 2012-10-10 15:55:25: Accepting SMTP connection from [x:49161] to [y:25]
Wed 2012-10-10 15:55:25: --> 220 Mdaemon; Wed, 10 Oct 2012 15:55:25 +0200
Wed 2012-10-10 15:55:25: <-- EHLO x
Wed 2012-10-10 15:55:25: --> 250-Hello x, pleased to meet you
Wed 2012-10-10 15:55:25: --> 250-VRFY
Wed 2012-10-10 15:55:25: --> 250-EXPN
Wed 2012-10-10 15:55:25: --> 250-ETRN
Wed 2012-10-10 15:55:25: --> 250-AUTH LOGIN
Wed 2012-10-10 15:55:25: --> 250-8BITMIME
Wed 2012-10-10 15:55:25: --> 250 SIZE 20971000
Wed 2012-10-10 15:55:25: <-- AUTH LOGIN
Wed 2012-10-10 15:55:25: --> 334 VX......
Wed 2012-10-10 15:55:25: Connection closed
Wed 2012-10-10 15:55:25: SMTP session terminated (Bytes in/out: 26/212)
Googling does not reveal much except that it indeed "doesn't work" and Exchange pops up all over the place.
This is no Exchange server. I just want a plain and straight SMTP connection to work. How?
(I have tried running the task as normal user and as system account, no difference.)
Sending a mail manually using telnet to port 25 from that server is working.
(Windows 2008 R2)
Does the mail server allow anonymous connections and/or does the user running the task have rights to send mail via the mail server?
It appears your mail server is requesting a user name from the task scheduler and closing the connection.
If you can't change the authentication mechanism on the mail server, you could look at tools like blat or use PowerShell (Send-MailMessage) to pass a message with explicit credentials.
What the hell, I am now using blat to send mails (Action -> Start Program -> blat). Forget the M$ built-in and non-working crap.
(Sorry for the frustration, but taking two days trying to send a plain mail without anyone anywhere having a clue how to make it work doesn't make me happy at all.)