Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)

share|improve this question
What version of Windows? How are you trying to send the message? After all, it's not the Task Scheduler that's trying to send the message but whatever script or program it's running. Relevant details are required. – John Gardeniers Oct 10 '12 at 17:26
Sure, Task Scheduler sends the message. The action defined in task scheduler is to send an e-mail. I don't care how it does. It should just do it. – Marki Oct 11 '12 at 8:07
Sending a mail manually using telnet to port 25 from that server is working. – Marki Oct 11 '12 at 8:08

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.

share|improve this answer
The user running the task seems to have enough rights opening a socket to the mailserver. For the rest, it exchanges plain SMTP commands and data, which should be accepted by the mailserver. At least it is accepted when trying a manual send via port 25. – Marki Oct 11 '12 at 8:09
In your attempt to send manually, are you providing authentication? Just saying that you can send mail via telnet doesn't answer my questions above to allow us to continue troubleshooting. – Steven Murawski Oct 11 '12 at 14:37
up vote 0 down vote accepted

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.)

share|improve this answer
The statement about anyone anywhere having a clue is not true. We just began to troubleshoot and there is nowhere near enough detail to make an actual call if the Task Scheduler mail is broken. I can understand being frustrated trying to make things work, but if you ask a question in a public forum, you need to understand that we don't know anything about your environment other than what you tell us in the question. People leaving answers or comments are just trying to find the relevant details to help you. Answers like this make people much less willing to help. – Steven Murawski Oct 11 '12 at 14:45
Sorry, but the net is full of people failing to send mail using Task Scheduler. Probably by "sending e-mail" they (Microsoft) understand something else than a plain old SMTP connection without gimmicks. – Marki Oct 22 '12 at 16:39
The net is full of people failing to get W2K8R2 Scheduled Tasks to run at all. I am expecting this to be fixed with a service pack, or the classic "oh, that never worked correctly in (pevious version). You need (current version)." – Alan M Apr 21 at 18:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.