Email/SMTP Configuration

Several features of mojoPortal send email meessages and for these features to work you must configure an SMTP server in 2 places in the Web.Config file.

In the appSettings section you will need to edit these settings:

<add key="SMTPServer" value="localhost" />
<add key="SMTPRequiresAuthentication" value="false" />
<add key="SMTPPort" value="25" />
<add key="SMTPUser" value="UserName" />
<add key="SMTPPassword" value="UPassword" />

In many cases these settings will work if you have an SMTP server running locally on the web server but in other cases your environment will differ and you will need to change these. You can also specify these or any other appSettings in user.config. This can save you from having to re-edit them when upgrading because user.config won't be overwritten.

You also need to specify SMTP settings as the bottom of Web.config in the system.net section:

<system.net>
  <mailSettings>
    <smtp from="noreply@yourdomain.com">
     <network
       host="localhost"
       port="25"
       password=""
       userName=""
     />
   </smtp>
 </mailSettings>
</system.net>

Unfortunately there is no way to put this in an external file so you'll have to update this again any time you upgrade and the web.config file changes.

The system.net settings are needed to support use of some of the built in ASP.NET 2.0 controls like PasswordRecovery whereas the appSettings section has been in use in mojoPortal since before 2.0 ASP.NET came out.


Donate Money to support the mojoPortal Project.
Join the mojoPortal Group on Facebook
Join the mojoPortal Group on LinkedIn
View Joe Audette's profile on LinkedIn
View Joe Audette's profile on The Guild of Accessible Web Designers site
mojoPortal can run on GNU/Linux using Mono

ASP.NET Web Applications, Controls, Resources, Reviews
WorldOfASP.NET
view our resources 123aspx.com Directory
411ASP.NET
mojoPortal Wins the 2007 Open Source CMS Awards Best Non-PHP Open Source CMS
Share This Using Popular Bookmarking Services