Skip to main content

Hi,

 

Using the email adress in k2 smartform dones not resolve and getting the error as below. but the same  email adress does resovlve in workflow.

below is exception  

 

The remote name could not be resolved: 'svc_k2devnotify@abc.com'
 
  • Type:
    System.Net.WebException
  • Source:
    System
  • Method Base
    • Member Type:
      Method
    • Name:
      GetConnection
    • Module
      • Scope Name:
        System.dll
    • Declaring Type
      • Full Name:
        System.Net.ServicePoint
  • 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.Send(MailMessage message)

From the error message, it seems to be attempting to resolve a remote name to the SMTP server, but found an email address instead.


 


Please check the default environment library, for a "Mail Server" field of Type "Mail Server".   Is it currently set as the default?  It may be that the "From Address" is currently the default, if so, please change it to the "Mail Server" field.  Perhaps a K2 blackpearl service restart is also necessary.


 


11752iAFCFA08E88D5F045.png


Hi Tin,

 

I did as you mentioned and getting below error now.

No connection could be made because the target machine actively refused it


This "No connection could be made because the target machine actively refused it" usually indicates that perhaps the K2 blackpearl Server service is not running.


 


Or, if you have a "Developer" type license; you will need to run the K2 blackpearl server in console mode; usually using the Start > All Programs >  K2 blackpearl Server (Service Account) link to start it in console mode.


Hi Tin,

 

I am getting below error.. do the workflow use the same configuraiton as smartform to connect to exchange server?

 

No connection could be made because the target machine actively refused it 10.99.34.220:25
 
  • Type:
    System.Net.Sockets.SocketException
  • Source:
    System
  • Method Base
    • Member Type:
      Method
    • Name:
      DoConnect
    • Module
      • Scope Name:
        System.dll
    • Declaring Type
      • Full Name:
        System.Net.Sockets.Socket
  • Stack Trace:

    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)

I believe K2 blackpearl can be configured to use either EWS or an SMTP server to send email; you can confirm this via running the ConnectionStringEditor.exe (use the Run as administrator option) tool from C:Program Files(x86)K2 blackpearlHost ServerBin.


 


Regarding sending email from Smartform action, I believe this will use the "Mail Server" environment field.


 


The current error seems to indicate perhaps an IP address resolution/port/firewall issue.  Please confirm if SMTP server specified is correct, if the port is correct (looks like it is trying port 25, but it could be port 587, etc.), and if there is any firewall blocking the TCP connection on specified port.


 


Perhaps test sending an email from the K2 server using telnet as per:


https://technet.microsoft.com/en-us/library/aa995718(v=exchg.65).aspx


 


Do you see the same error when doing so?


 

K2 support help us to resolve this issue and to make smartforms' email action to work we chnaged from exchange to SMTP and it worked.

Below is discussion we had with K2 support and it would be hlepful for any email issues amybpdy have.

 

- To address the Smartforms issue, we looked at the Mail Server variable in the environment library, and saw that it was set to the Exchange server, which does successfully send emails through workflows. We determined that this was not the SMTP server, and tested setting the SMTP Mail Server variable that was added to the library to Default. This allowed the Smartform to sent the email successfully.

1. Regarding email workflows, I explained the following:

For Client Event notifications:
- K2 first looks at the value for <add path="SmartActionsnEWS or SMTP]" /> to determine which set of connection strings it should use.
- K2 then looks at the From address that is sending the email, and tries to locate a connection string with that email address after it. (i.e. .......ExchangeWebServicesDestination (k2service@denallix.com))
- If it doesn't find a connection string with that From Address, it then tries to find a connection string with no address after it. This is a sort of last-resort gateway for email.
- If you are using SmartActions, you can use SMTP to send all email, you just need to make sure that the ExchangeWebServicesConnection connection string is populated, since we use that to connect to the mailbox to check for SmartAction replies.
- Also, if you are using SmartActions, the email address for Client Event Notifications cannot be changed. This is dictated by the <system self="K2:2DOMAINUSER]" ...etc... > line in the K2HostServer.exe.config file

2. Regarding Mail Events:
- K2 defaults to SMTP for Mail Events, and if it is unable to send using SMTP it will then failover to EWS.
- We use the same method above for determining which connection string should be used for the From Address that is sending the mail


Reply