Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-05-29
3
Medium Priority
?
443 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 750 total points
ID: 39206485
0
 
LVL 10

Accepted Solution

by:
bigbigpig earned 750 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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

719 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