Windows 2008 Server Standard SP2
MS SQL Server 2008 Standard
mojoPortal 2.3.1.0
I am having trouble configuring my mojoPortal installation to send emails. I can connect to the specified email server using telnet without problem from my server. Trying various settings I always get the error "parameter 'address' cannot be an emtpy string"
This error gets logged when trying to send email through the contact form:
2009-07-16 02:52:40,678 INFO mojoPortal.Web.Global - Application Started.
2009-07-16 02:53:22,783 ERROR mojoPortal.Web.ContactUI.ContactForm - System.ArgumentException: The parameter 'address' cannot be an empty string.
Parameter name: address
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at System.Net.Mail.MailAddress..ctor(String address)
at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority, String[] attachmentPaths, String[] attachmentNames)
at mojoPortal.Net.Email.SendEmailNormal(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)
at mojoPortal.Net.Email.SendEmail(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)
at mojoPortal.Web.ContactUI.ContactForm.btnSend_Click(Object sender, EventArgs e)
From my web.config:
-->
<add key="EnableSiteSettingsSmtpSettings" value="true" />
<add key="MaskSmtpPasswordInSiteSettings" value="false" />
<add key="ShowSmtpEncodingOption" value="false" />
<!-- ******* end multi site installation settings -->
<!-- ******* email settings
Note you also need to specify smtp settings further below in system.net section the settings here appply to features but
the settings in the system.net.mailsettigns section are used by site registration and password recovery -->
<add key="DisableDotNetOpenMail" value="true" />
<add key="SMTPServer" value="postur.simnet.is" />
<add key="SMTPRequiresAuthentication" value="true" />
<add key="SMTPUseSsl" value="false" />
<add key="SMTPPort" value="25" />
<add key="SMTPUser" value="xxx@simnet.is" />
<add key="SMTPPassword" value="*******" />
<add key="SMTPTimeoutInMilliseconds" value="30000" />
<!-- leave this blank for ascii encoding -->
<add key="SmtpPreferredEncoding" value="" />
<!-- example for Russian encoding
<add key="SmtpPreferredEncoding" value="koi8-r" />
-->
and:
<system.net>
<mailSettings>
<smtp from="xxxx@dexxen.com">
<network host="postur.simnet.is" port="25" password="********" userName="xxx@simnet.is" />
</smtp>
</mailSettings>
</system.net>
From the Mail settings in Administration UI:
SMTP User: xxx@simnet.is
SMTP Password : *******
SMTP Server : postur.simnet.is
SMTP Port : 25
SMTP Requires Authentication? true
SMTP Use SSL? False