Solved

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

Posted on 2013-05-29
3
418 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
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…
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…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Suggested Courses

623 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