Solved

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

Posted on 2013-05-29
3
395 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

733 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