Skip to main content

When using the connection string editor, is it possible to have more than one WebServicesConnection and WebServicesDestination defined on a single K2 Server instance?  We wanted to route From Address mail from multiple sources on our K2 instance depending on the workflow, when I added a second pair with a different email address to use on some of our workflows, I could no longer restart the K2 blackpearl service.  Is there a hard limit on this where we can only define a single email address to use in the From Address field?

 

Also, if I just attempt to hard code the alternative email address into the workflow, I get an error on that indicating that the exchange server "send on behalf of permissions" are not set.  The email address that is presently working does not have any such permissions set on it as was confirmed by our exchange server administrator.

I believe you can only have one connection string of the 'ExchangeWebServicesConnection' type; as this is the connection string used for SmartActions processing and SmartActions can only ever be configured for a single mailbox.  It is possible to have more than on ExchangeWebServicesDestination types (used for sending email) mapped to the email address and credentials in question; to allow email sending as that email address.


 


This 'send on behalf of permission' will allow the account specified in the 'ExchangeWebServicesDestination' connection string that is not bound to an email address rights to send the email on behalf of the account that is specified in the from address.  The user receiving the email will see 'K2Notification on behalf of Bob' instead of just from 'Bob' as the from address.


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


 


I believe the flow will be as such for an email event:


 


a.  In the email event


- From Address: Bob@contoso.com


- To Address: Mike@contoso.com


 


b.  When the workflow run


1.  Is there 'ExchangeWebServicesDestination (Bob@contoso.com)' connection string?  If so, use this connection string to send the email.


- Mike will receive an email with from address = Bob


 


2.  If 'ExchangeWebServicesDestination (Bob@contoso.com)' connection string does not exist, use the 'ExchangeWebServicesDestination' (no email address) connection string


- But wait, the account bound to this connection string is 'K2Notifications@contoso.com' and not Bob


- Does the 'K2Notifications@contoso.com' account have 'send on behalf of' permission for Bob's mailbox?  If not throw error that 'The e-mail address bob@contoso.com does not have ‘send on behalf of’ permissions on Exchange."


- To configure this would involve adding the 'K2Notifications@contoso.com' account to the 'Send on Behalf of' permission for the ' bob@contoso.com' mailbox


- However, this change will not be effective right away as Exchange caches this setting (perhaps waiting 2+ hours before retrying or restarting the Exchange Information Service):


https://cloudiffic.com/changes-made-to-exchange-are-not/ 


- Once this is effective, Mike will receive the email with the from address of 'K2Notification on behalf of Bob' instead of just 'Bob'


Reply