Solved

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

Posted on 2013-05-29
3
358 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
Comment Utility
0
 
LVL 10

Accepted Solution

by:
bigbigpig earned 250 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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 walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

763 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

11 Experts available now in Live!

Get 1:1 Help Now