Groups | Blog | Home
all groups > asp.net > may 2005 >

asp.net : Sending Email


Daniel Groh
5/12/2005 10:17:36 PM
Hi, How do I send email with properties stored in my web.config ? Does
someone has any example ? How should the web.config be ? Wich statements ?

I don't find any examble in Internet, can someone please help me ?

Thanks in Advance

Shaji
5/13/2005 1:10:06 AM
Hi,

Your Config
=========
<configuration>
<appSettings>
<add key="EmailServerName" value="mail.YourDomain.com"/>
</appSettings>

<system.web>
<customErrors mode="Off" />
</system.web>
</configuration>


Your code behind
=============
Dim MailSarver As String =
ConfigurationSettings.AppSettings("EmailServerName")


Also take a look @ http://www.4guysfromrolla.com/webtech/080801-1.shtml

HTH



[quoted text, click to view]
AddThis Social Bookmark Button