Solved

C#  - how to configure windos 2008 R2 to email using System.Net.Mail

Posted on 2013-05-29
3
371 Views
Last Modified: 2013-05-30
I use a simple emailing program written in .Net C# - .Net 3.5
the class I use is System.Net.Mail

the program worked fine on one server and since moving to a new 2008 R2 server does not send emails out.

I am yet to debut it - and drill and get to any errors. But before that is there any known issues or tweaks to setup in Windows Server 2008 R2 to get emailing work ?

Thanks very much in advance.
0
Comment
Question by:indikad
3 Comments
 
LVL 21

Assisted Solution

by:Tapan Pattanaik
Tapan Pattanaik earned 250 total points
ID: 39206485
0
 
LVL 10

Accepted Solution

by:
bigbigpig earned 250 total points
ID: 39206547
Does your code send through the local server that it executes on?  If so you'll need to set up IIS for SMTP like tapanpattanaik said.  If you send through a different server then make sure you can get to your SMTP server from your 2008 R2 server on tcp 25.

For example, if your code says this make you can get to 'smtp.mydomain.local'.  Basic telnet command will tell you (telnet smtp.mydomain.local 25).
SmtpClient client = new SmtpClient();
client.Host = "smtp.mydomain.local";

Open in new window

0
 

Author Comment

by:indikad
ID: 39209657
Hi all,

sorry for not getting back to you soon.  I had bee debugging it and accidentally found the issue!

The network admins who were so adamant that the SMTP host address they gave me was correct , had actually given me a non working SMTP host.

all good now.

However thanks for the help and links provided and the attention give here. I will distribute points.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now