Email

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/16/2009 1:15:22 AM
Gravatar
Total Posts 1

Email

Windows server 2008  Mysql  2.2.9.2

Cannot send mail via localhost, gmail etc. The log file is as follows....

DotNetOpenMail.MailException: Could not connect to ::1:25 ---> System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used ::1:25
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP)
at DotNetOpenMail.SmtpProxy.Open()
--- End of inner exception stack trace ---
at DotNetOpenMail.SmtpProxy.Open()
at DotNetOpenMail.SmtpServer.Send(ISendableMessage emailMessage, EmailAddressCollection rcpttocollection, EmailAddress mailfrom)
at mojoPortal.Net.Email.SendEmail(SmtpSettings smtpSettings, String from, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority)
 

I tried enabled dotnetopenmail and it sent one email and that was it. Not to be repeated.

I am also running multiple sites with enablesitesettingsmtpsettings set to "true"

Man I'm baffled

3/16/2009 7:27:44 AM
Gravatar
Total Posts 18439

Re: Email

Hi Phil,

SMTP settings can be a bit tricky to get right, but they do work if correctly configured. My notes about it are here:
http://www.mojoportal.com/emailconfiguration.aspx

I would make sure the site "Default Email From Address" in Site Settings is the same address used for the smtp account.

Some users have also reported that when using google they need to change this to true:

<add key="DisableDotNetOpenMail" value="false" />

which will disable DotNetOpenMail and make it use the normal .NET smtp classes. It has always worked for me but some users get TLS errors and disabling DotNetOpenMail seems to solve it.

Hope it helps,

Joe

7/4/2010 4:09:16 AM
ulu
Gravatar
Total Posts 22

Re: Email

This error is related to IPv6  being preferred over IPv4 -- "::1" is your localhost address in IPv6 terms. Disabling IPv6 through the registry and restarting the computer solved this for me, although I'm not sure this is a good solution.

What are the consequences of disabling the DotNetOpenMail?

7/5/2010 6:34:21 AM
Gravatar
Total Posts 18439

Re: Email

In the latest version of mojoPortal DotNetOpenMail is disabled by default. The consequence is that is uses the built in ASP.NET System.Net.Mail classes instead of the DotNetOpenMail dll. DotNetOpenMail is an open source project that is not maintained, at some point I will remove it completely, so I recommend keep it disabled.

Not sure about ipv6 vs ipv4 in relation to smtp, I have never seen issues related to it though it sounds reasonable.

Best,

Joe

10/5/2010 6:27:34 AM
Gravatar
Total Posts 13

Re: Email

Hi Joe,

I have the following environment and experiencing problem with email config.

=> mojoPortal Version  2.3.5.3 MSSQL, running on IIS7, .Net 4.0 (upgraded) at godaddy

i put the email settings as follows:

<add key="DisableDotNetOpenMail" value="true"/> -tried with false as well
    <add key="SMTPServer" value="smtp.gmail.com"/>
    <add key="SMTPRequiresAuthentication" value="true"/>
    <add key="SMTPUseSsl" value="true"/>
    <add key="SMTPPort" value="587"/>
    <add key="SMTPUser" value="myacct@gmail.com"/>
    <add key="SMTPPassword" value="mypass"/>
    <add key="SMTPTimeoutInMilliseconds" value="30000"/>

<system.net>
    <mailSettings>
      <smtp from="myacct@gmail.com">
        <network host="smtp.gmail.com" port="587" password="mypassword" userName="myacct@gmail.com"/>
      </smtp>
    </mailSettings>
  </system.net>

I set the admin account, in the site configuration with myacct@gmail.com.

regardless of the DisableDotNetOpenMail setting, i observe only the system.net mail component running, and not dotnetopenmail, is this depreciated in the .net4 version of mojoportal?

I tried different smtp servers, our exchange server, host provider's smtp, yahoo and gmail. in all cases, i am getting the following error:

2010-10-05 04:15:45,184 ERROR mojoPortal.Net.Email - error sending email to validtestemail]@yahoo.com from myacct@gmail.com, will retry
2010-10-05 04:16:51,346 ERROR mojoPortal.Net.Email - all retries failed sending email to validtestemail@yahoo.com from myacct@gmail.com, message was: Thank You for Registering with !

Your Registration will be confirmed by clicking the link below to unlock your account.
This is to prevent other people from Registering with your email address.

http://www.acbfpact.org/ConfirmRegistration.aspx?ticket=de414f9a-2aae-40f1-9828-b6eb60d889c3
System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.67.109:587
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
   at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
   at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
   at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
   at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
   at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)
   at System.Net.Mail.SmtpClient.GetConnection()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- End of inner exception stack trace ---
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at mojoPortal.Net.Email.Send(SmtpSettings smtpSettings, String from, String replyTo, String to, String cc, String bcc, String subject, String messageBody, Boolean html, String priority, String[] attachmentPaths, String[] attachmentNames)

 

Thanks

10/5/2010 7:36:22 AM
Gravatar
Total Posts 18439

Re: Email

Hi Fisal,

Sorry, but all I know is documented here: http://www.mojoportal.com/emailconfiguration.aspx

Email can be tricky to get working for lots of different reasons. There can be firewalls involved that prevent smtp or block certain ports. There can be ip address restrictions that prevent some machines from relaying to other machines. Gmail configuration in particular some people report success and some people report they cannot get it working, it may vary from Country to Country whether it works and configuration may not be the same in all countries.

You also need to make sure that in Administration > Site Settings - "Site From Email Address" is the same address you are using in smtp settings for sending the mail. Otherwise it may block it because it looks like it spoofs and invalid email address.

Hope it helps,

Joe

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