Home > Forum > Actions > Error action mail

Error action mail
1

MVP

Hi,
We upgraded from 2022.1.1.53 to 2022.1.2.59 and after the upgrade the action :Send standard (or custom) mail in not working.

When we TEST from System settings -> E-mail notifications -> Configuration of sending e-mail, the emails are sent.

When send email from action, the action is working and the email sending to queue, but I get error in Local service status.

Here is the error text from Local service status:



WEBCON Workflow E-mail Service Module Error
Role: EmailsService
System.Net.Mail.SmtpException: The operation has timed out.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at WebCon.WorkFlow.Service.Emails.EmailsModule.Activity.SendMail(WFMails mail)


OR


WEBCON Workflow E-mail Service Module Error
Role: EmailsService
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 52.97.183.194:25
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)
--- End of inner exception stack trace ---
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.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at WebCon.WorkFlow.Service.Emails.EmailsModule.Activity.SendMail(WFMails mail)

MVP

Hi,

based on the message I somehow doubt, that it is actually a problem with WEBCON BPS. Maybe it's a coincidence or it wasn't noticed, that there were issues before?

Regardless, I would try to send a mail with the same settings using PowerShell from the server:

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.2

If this does actually work, you can dig deeper, but for the moment I would verify that "Unable to connect to the remote server" happens only when WEBCON BPS sends mail. Maybe it's really some firewall or changed server address issue.

Best regards,
Daniel

WEBCON
In reply to: Raluca-Mirabela Lupu

Thank you very much for your help

Best regards,
Raluca

Hi
The only way I can reproduce the error (with smtp.office365.com) is a scenario when the "Sender" defined in a custom email action or in an email template is different from the UPN of the mailbox used to send emails.
Test email works - it uses a global configuration.
Office 365 does not allow to use Sender address different than mailbox UPN.

MVP
In reply to: Pawel Jawien (WEBCON)

Hi
The only way I can reproduce the error (with smtp.office365.com) is a scenario when the "Sender" defined in a custom email action or in an email template is different from the UPN of the mailbox used to send emails.
Test email works - it uses a global configuration.
Office 365 does not allow to use Sender address different than mailbox UPN.

After all the problem was that the password had the # character inside. This character among potential other characters (probably ' or " ) it will break the functionality of sending emails. A similar problem (Bug) happens also when your sql password, if you use sql auth, contains the character ". This will actualy break the appsettings json, making it an invalid format. In this case the entire portal will break.