3

I have Web Forms for Marketers 8.2 rev. 160801. On my local machine. I've created simple form and assigned an action 'Send Email Message' on submit. Form can be successfully submitted, but no emails sent.

My parameters for 'Send Email Message' are:

<Host>smtp.mingo.local</Host><port>25</port><From>noreply@mingo.com</From><IsBodyHtml>true</IsBodyHtml>

Web.config:

<configuration>
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="Network" from="noreply@mingo.com">
        <network host="smtp.mingo.local" port="25" defaultCredentials="false"/>
      </smtp>
    </mailSettings>
    <defaultProxy enabled="true"/>
    <settings>
    </settings>
  </system.net>

smtp.mingo.local on port 25 is working. I've checked with Telnet. It responds.

But I have following in logs:

ManagedPoolThread #17 2016:12:06 11:03:49 ERROR Exception in task Exception: System.Net.Mail.SmtpException Message: Failure sending mail. Source: System at System.Net.Mail.SmtpClient.Send(MailMessage message) at Sitecore.Tasks.EmailReminderTask.SendReminder(Item item) at Sitecore.Tasks.EmailReminderTask.SendReminder() at Sitecore.Tasks.TaskDatabaseAgent.Run()

Nested Exception

Exception: System.Net.WebException Message: Unable to connect to the remote server Source: System at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, 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.SmtpClient.Send(MailMessage message)

Nested Exception

Exception: System.Net.Sockets.SocketException Message: An attempt was made to access a socket in a way forbidden by its access permissions xx.xx.xx.xx:25 Source: System 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, Exception& exception)

Does anybody knows what can be an issue?

What did I miss?

7
  • I dont think that error is related to your WFFM email action, as its coming from scheduled task 'Sitecore.Tasks.EmailReminderTask.SendReminder', Can you check whats in the logs at the exact time you submit the form? Dec 6 '16 at 12:34
  • you can try using smtp4dev tool in your local instance and see if emails get sent correctly. you have to set the host parameter value to 'localhost' when you are using this tool. Dec 6 '16 at 12:50
  • Except error above, I have 'ERROR Must have Sitecore.MSCRM license to use Microsoft Dynamics CRM security provider', 'ERROR Failed to perform GeoIp lookup for...' and 'Error while rendering view: '/sitecore/shell/client/Speak/Layouts/Renderings/Common/PageCodes/PageCode.cshtml'
    – Oleksandr
    Dec 6 '16 at 13:01
  • I tried SMTP tool and I was able to send email (but email body was empty)
    – Oleksandr
    Dec 6 '16 at 13:35
  • Does the values for the tags MailServer, MailServerUserName, etc show on the showconfig page? Also have you made sure there isn't anything on IIS preventing you from connecting to this smtp server?
    – Diego
    Dec 6 '16 at 16:12
0

Did you set these configurations directly on the web.config?

you should be using the host and authentication tags on the Sitecore.config file like this:

<Host>smtp-mail.outlook.com</Host><Port>587</Port><EnableSsl>true</EnableSsl><Login>sitecore@outlook.com</Login><Password>xyz1234<Password><IsBodyHtml>true</IsBodyHtml>

you can check how to configure smtp for WFFM here

3
  • i think this steps is only necessary if we are using multi-server setup with email sending configured in CD instance Dec 6 '16 at 12:49
  • Yes, I have these configurations on Web.config. I've added in Sitecore.config: <setting name="MailServer" value="smtp.mingo.local" /> <setting name="MailServerUserName" value="" /> <setting name="MailServerPassword" value="" /> <setting name="MailServerPort" value="25" /> and at sitecore/System/Modules/Web Forms for Marketers/Settings/Actions/Save Actions > Send Email Message: <Host>smtp.mingo.local</Host><port>25</port><From>noreply@mingo.com</From><IsBodyHtml>true</IsBodyHtml> but it still not working
    – Oleksandr
    Dec 6 '16 at 12:57
  • yeah I forgot to mention that this was for scaled environments
    – Diego
    Dec 6 '16 at 16:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.