Search

Include "EnableSSL" option for System.Net.SmtpClient when using configuration file. by james_crowley

Closed
as Fixed Help for as Fixed

20
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Suggestion
ID: 281277
Opened: 6/4/2007 12:10:45 PM
Access Restriction: Public
1
Workaround(s)
When using the SmtpClient class, you can configure its settings externally using a configuration file:

<system.net>
    <mailSettings>
     <smtp deliveryMethod="Network">
        <network .... />
     </smtp>
    </mailSettings>
</system.net>

However, there is no configuration property available for the "EnableSSL" of the SMTP client.
Details (expand)
Product Language
English

Version

Visual Studio 2005 (All Products and Editions) Service Pack 1
Operating System
Windows XP Professional
Operating System Language
English
Problem Statement
If you need to specify an SMTP server that only allows SSL connections, you cannot configure this through an external configuration file - you have to modify your email sending code directly, defeating the whole object of externalizing these details!
Proposed Solution
Add an enableSSL attribute to the network configuration node in the configuration files.
TAP Code (if applicable)
 
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Sukumar Venigalla on 6/19/2007 at 4:37 AM
Hi,

     Nice point we need to make this changes.


Bye,
Sukumar.
Posted by Microsoft on 2/18/2009 at 7:29 PM
Thanks for the suggestion. Makes sense and we'll consider this for a future release.
-Network Class Library Team
Posted by Microsoft on 5/28/2009 at 12:31 PM
We will adding this feature for the .NET 4.0 release.

Thank you,

Network Class Library Team
Posted by dcumg on 1/22/2010 at 1:28 PM
This has not made it to .NET Framework 4.0 Beta 2. Please make sure that this makes it to RTM.