Tom,
If you check my blog:
spaces.msn.com/sholliday/
2/8/2006 entry
There is a "smtp server settings" project.
Of course, smtp server settings isn't what you're looking for, ~but it has
the code for writing
configuration section handler as Nicholas talks about.
Mine looks like this:
and I use it to create
SmtpServer objects (with some properties)
and put those into a
SmtpServerCollection object.
its basically an xml file to object mapping type system.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="EmailSettingsSectionName"
type="GranadaCoder.Email.Settings.EmailSmtpSettingsHandler,GranadaCoder.Emai
l.Settings" />
</configSections>
<EmailSettingsSectionName defaultEmailFrom="(e-mail address removed)"
portNumber="25">
<!--You need to add a reference to
GranadaCoder.Email.Settings.EmailSmtpSettingsHandler.dll since this dll
lives outside this (Presentation) assembly-->
<!--Comments can go here-->
<!--SSL example. Google(gmail)Mail is a good (free) example of this.
Naturally, you need to provide a legitimate username and password-->
<!--Note, with the 2.0 Framework, my tests show that gmail likes port 587-->
<smtpServer enabled="true" smtpServerName="smtp.gmail.com"
defaultEmailFrom="(e-mail address removed)" portNumber="465"
authenicationMode="SSL" smtpUserName="(e-mail address removed)"
smtpUserPassword="mygmailpassword" executeOrder="3"/>
<!--Basic authentication. Passing in a username (and sometimes a password)
are used here.-->
<smtpServer enabled="true" smtpServerName="smtp-server.nc.rr.com"
defaultEmailFrom="(e-mail address removed)" portNumber="25"
authenicationMode="basic" smtpUserName="(e-mail address removed)" executeOrder="2"/>
<!--None authentication. Nothing but the smtp-server name is provided-->
<smtpServer enabled="false" smtpServerName="smtp.noauthenticationneeded.com"
authenicationMode="none" executeOrder="1"/>
</EmailSettingsSectionName>
</configuration>