Contact Form Email not sent.

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
4/1/2013 9:50:48 AM
Gravatar
Total Posts 28

Contact Form Email not sent.

I am working on Contact form checking whether email configuration .
I have done  necessary changes related to SMTP setting in User.config file .
I am continuously getting this exception  
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:25

Any one have idea about this exception .I goggled for this & found out that it may be because of Antivirus or firewall is not disabled .but both are disabled so that is not a problem 
Any one have other solution.

SMTP Setting in User.config

<add key="SMTPServer" value="192.168.0.1" />
  <add key="SMTPRequiresAuthentication" value="false" />
  <add key="SMTPPort" value="25" />
  <add key="SMTPTimeoutInMilliseconds" value="30000"/>
  <add key="SMTPUseSsl" value="true"/>
  <add key="SMTPUser" value="noreply@tech.net" />
  <add key="SMTPPassword" value="noreply" />
  <!-- leave this blank for ascii encoding -->
  <add key="SmtpPreferredEncoding" value="" />
 

4/1/2013 9:54:34 AM
Gravatar
Total Posts 18439

Re: Contact Form Email not sent.

The ip address you put for smtp server looks more like an ip address for a local router

4/4/2013 8:23:07 AM
Gravatar
Total Posts 28

Re: Contact Form Email not sent.

Thanks for reply I have changed  the settings.It was a problem of IP .I have changed accordingly & checked Contact Form & it is working now. 

after that i started working on  Recover Password & Registration Confirmation mail whether email are going or not . No Emails received .I have checked forums in mojoportal according to that we need to make changes in System.net section of web.config.
I have made those changes still no mail received .No error is also logged in system.log .
My SMTP Setting are given below :
 
web.config

 <system.net>
    <mailSettings>
      <smtp from="noreply@tech.net">  
        <network host="127.0.0.1" port="25" password="noreply" userName="noreply@tech.net" />
      </smtp>
    </mailSettings>
  </system.net>

user.config

  <add key="SMTPServer" value="127.0.0.1" />
  <add key="SMTPRequiresAuthentication" value="false" />
  <add key="SMTPPort" value="25" />
  <add key="SMTPTimeoutInMilliseconds" value="30000"/>
  <add key="SMTPUseSsl" value="false"/>
  <add key="SMTPUser" value="noreply@tech.net" />
  <add key="SMTPPassword" value="noreply" />
  <!-- leave this blank for ascii encoding -->
  <add key="SmtpPreferredEncoding" value="" />

4/5/2013 2:45:13 PM
Gravatar
Total Posts 18439

Re: Contact Form Email not sent.

long ago the system.net mailsettings were used for password recovery and registration confirmation but not in quite a while. Those settings are not used anywhere in mojoPortal, only the settings in user.config are used.

If Contact Form email works then other emails should also work. Make sure you have a valid email address in Site Settings for the default from address.

email failure doesn't always result in an error message, lots of mail servers work as a queue and accept the relay but then when they process the queue they could still reject the message for various reasons like the from address is not valid. Only certaint kind sof errors result in an actual error being logged, like if the mail server refuses the connection or if it can't connect to the mail server it will generally log an error.

Also your isp can also block smtp traffic on port 25 which may not result in an error since the local machine smtp server accepts the message but it gets blocked upstream by the isp. isps often do block smtp because lots of spam is sent from compromised machines and to curb that many isps only allow you to relay mail through their own mail servers and they have restrictions to limit the volume of mail sent.

You must sign in to post in the forums. This thread is closed to new posts.