# Send Mail fails while Build started via Task Scheduler

**URL:** https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529
**Category:** Discussion
**Created:** [July 19, 2010, 11:34am UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529 "2010-07-19T11:34:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 19, 2010, 11:34am UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/1 "2010-07-19T11:34:41Z")

</div>

Hello,

I've a problem with send mail task if the build is started via windows task scheduler. If I start the build within the Finalbuilder the send mail task&nbsp;woks fine. Finalbuilder is version 6.2.0.1074

Any ideas?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 19, 2010, 11:54am UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/2 "2010-07-19T11:54:33Z")

</div>

How is it failing, what is the actual error that is logged? Which operating system are you running under? Is windows firewall turned on? Have you tried updating the latest build of FinalBuilder?

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 19, 2010, 12:05pm UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/3 "2010-07-19T12:05:49Z")

</div>

> Posted By Vincent Parrett on 19 Jul 2010 04:54 AM   
> How is it failing, what is the actual error that is logged? Which operating system are you running under? Is windows firewall turned on? Have you tried updating the latest build of FinalBuilder?

The OS is Win2003 Server. Firewall and OS ist not the problem, because I tried all runs on the same machine. All actions ar running, except the send mail action is not running while the build is started via task scheduler.

No, I didn't tried the latest Build of Finalbuilder.

The error is:

> Unable to Send Message (Connect)  
> Socket Error # 10061  
> Connection refused.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 19, 2010, 12:16pm UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/4 "2010-07-19T12:16:01Z")

</div>

When you tested without the scheduler, did you test with the same user that the scheduler is using? Firewalls can still cause problems when tasks are run under the scheduler.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 19, 2010, 12:35pm UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/5 "2010-07-19T12:35:30Z")

</div>

> Posted By Vincent Parrett on 19 Jul 2010 05:16 AM   
> When you tested without the scheduler, did you test with the same user that the scheduler is using?

Yes, it's the same user.

> Posted By Vincent Parrett on 19 Jul 2010 05:16 AM   
> Firewalls can still cause problems when tasks are run under the scheduler.

Why? I thought, this is allways the same executing process.

EDIT: The local windows firewall is not running and the smtp server (exchange) is in the same network.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 20, 2010, 9:58am UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/6 "2010-07-20T09:58:26Z")

</div>

Maybe we have a bigger problem in the company firewall or the company router. There is no telnet command possible to any external or internal SMTP Server.

Wonder why&nbsp;I can send emails when I start the Build with the Final Builder GUI...

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 20, 2010, 10:33am UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/7 "2010-07-20T10:33:52Z")

</div>

the anti virus scanner McAfee was the problem and blocked outgoing smtp requests.

Still wondering why&nbsp;I can send emails when I start the Build with the Final Builder GUI...

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 20, 2010, 11:36am UTC](https://www.finalbuilder.com/forums/t/send-mail-fails-while-build-started-via-task-scheduler/1529/8 "2010-07-20T11:36:38Z")

</div>

Probably detects when you are running the program interactively vs non interactive. In our experience it’s usually the firewall or antivirus software. McAfee is one of the worst, as even when you tell it to exclude programs it still seems to get in the way.
