Several features of mojoPortal send email messages, 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" />
<!-- leave this blank for ascii encoding -->
<add key="SmtpPreferredEncoding" value="" />
<!-- example for Russian encoding
<add key="SmtpPreferredEncoding" value="koi8-r" />
-->
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.
Yahoo Example
I'm using Yahoo business email account which I got when registering my domain through Yahoo Domains. My settings are like this and they work for me, but of course it varies with different email providers.
<add key="SMTPServer" value="smtp.bizmail.yahoo.com" />
<add key="SMTPRequiresAuthentication" value="true" />
<add key="SMTPPort" value="587" />
<add key="SMTPUser" value="youryahooemailaddress" />
<add key="SMTPPassword" value="youryahoopassword" />
<add key="SMTPUseSsl" value="false" />
smtp.bizmail.yahoo.com is the smtp server for email addresses connected to Yahoo Domains accounts. For normal yahoo accounts the setting is smtp.mail.yahoo.com
Also you may not need the @yahoo.com for the user name. So if your yahoo email is yourname@yahoo.com you might just put yourname.
Gmail Example
<add key="SMTPServer" value="smtp.gmail.com" />
<add key="SMTPRequiresAuthentication" value="true" />
<add key="SMTPPort" value="587" />
<add key="SMTPUser" value="yourusername@gmail.com" />
<add key="SMTPPassword" value="yourgmailpassword" />
<add key="SMTPUseSsl" value="true" />
Multi Site Installations
The Email Verification and Password Recovery will use the the settings from Web.config system.net mailsettings section, so no matter what we do all sites ina multi site installation will have to share this setting. For the rest of the features that send email, like blog comments, forums, contact form, newsletter, it is possible to make those features use site specific mail settings. By default all the sites will use the smtp settings from the appSettings section of Web.config (or user.config), but you can enable a hidden feature which will make the smtp settings show up in the Administration Menu > Site Settings Page. In Web.config (or ideally in user.config) set this setting to true:
<add key="EnableSiteSettingsSmtpSettings" value="true" />
Then you will see a new Tab in Site Settings where you can enter the smtp configuration.
Trouble Shooting Tips
If you are having trouble getting email working I recommend you use the Contact Form to test it until it works. Setup your own email address as the contact form recipient and then post messages. The Contact Form uses the smtp settings from the appSettings section of Web.cofig, or from (key icon) Administration Menu > Site Settings if you have enabled EnableSiteSettingsSmtpSettings in Web.config.
Whatever email address you are using to send email should be specified as the "Default Email From Address" in Administration Menu > Site Settings.
If you don't get the message, look for errors about sending mail in the mojoPortal system log under (key icon) Administration Menu > System Log. Newest errors are at the bottom, its usually best to clear the log before you start troubleshooting the problem. The error messages will usually give you a clue about the problem. If you don't understand the error you can post it in the forums and we'll try to help.
Note: If you are trying to set this up on your development machine or any machine that is connected to the internet using a consumer ISP like Comcast or RoadRunnder (TimeWarner) cable you need to know that many of those companies block all traffic on port 25 and you can only relay on port 25 through their own smtp servers. They do this to prevent computers on their networks that may be infected with viruses from being used to send SPAM. For example if you have a Comcast account you can only relay outbound email on port 25 using your Comcast email account and sending through the Comcast smtp server. Thats why most of the free email services like Yahoo and Gmail use alternate ports for smtp, like Yahoo uses port 587 for example. You can relay outbound email on ports other than 25.