You can make your Windows your SMTP host to help your programs send out mail. Setting up SMTP is relatively simple, just go to the Add/Remove Windows Components in the Add/Remove Programs in the Control Panel and add it as you do with IIS.
Once completed, it will use the companies default gateway which is determined by the MBX entries in your companies DNS. However, that may not be the closes internet gateway for your company (if your company has multiple gateway) and more likely that is also the busiest gateway.
To overcome this, you can specify the smarthost in the SMTP configuration to tell the server to direct the mails it routes to an alternate gateway. To do that right click on the Default SMTP Virtual Server and Select Properties. You will then see the following:
Click on Advanced, then enter your gateway host address as well as your own domain. In this example, I use Programmersjournal.blogspot.com as my domain name and smtp.yahoo.com as the gateway. Both are pseudonyms meant for illustration only.