Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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 -1 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

Your Answer

 
discard

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.