Fast2Host Logo

How to

Configuring <mailsettings> in web.config to send email

How do I configure the <mailsettings> section of web.config to send a simple enquiry form email from a website?

<configuration>
   <system.net>
     <mailSettings>
        <smtp from="email@yourdomain.com">
        <network host="mail.yourdomain.com" port="25" userName="email@yourdomain.com" password="youremailpassword"/>
        </smtp>
     </mailSettings>
   </system.net>
</configuration>


Substitute your email and domain details for the blue text


Maintain peace of mind with 24/7 UK based support

Email any time or call 01480 26 00 00 014 80 26 00 00