SharePoint 2013 - Unable to send emails to external email addresses (SharePoint 2013 workflows)
By default SharePoint Designer workflows creating using SharePoint 2013 Workflows will not sent emails to the external users (email addresses).
When you add a step "Email these users" in workflow and select type an external email address, you will receive a pop-up stating "The selected user(s) may not be valid on the site this workflow is published on. If a recipient is not a valid SharePoint user, he or she will not receive workflow emails."
This is by design behavior with SharePoint 2013 workflows where as the workflows you add from the SharePoint 2013 site (the workflows which are available as soon as you activate the features on the site collection or the site) have no impact as they are SharePoint 2010 workflows. With that said, the designer workflows created using SharePoint 2010 workflows will be working fine (including this functionality).
This is a security enhancement in SharePoint 2013 workflows to enable the users to get approval from the administrators before sending emails to the external users.
How is this implemented?
REST services validation.
For each and every user you add to the "email these users" in the designer creating using SharePoint 2013 workflows, a SOAP request is generated using the webservice (people.asmx) which calls ResolvePrincipals method to find the username. (_vti_bin/people.asmx?op=ResolvePrincipals).
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ResolvePrincipals xmlns="http://schemas.microsoft.com/sharepoint/soap/"><principalKeys><string>email@example.com</string></principalKeys>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ResolvePrincipalsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"> <ResolvePrincipalsResult><PrincipalInfo><AccountName>firstname.lastname@example.org</AccountName><UserInfoID>-1</UserInfoID><IsResolved>false</IsResolved><MoreMatches /><PrincipalType>All</PrincipalType></PrincipalInfo></ResolvePrincipalsResult> </ResolvePrincipalsResponse></soap:Body></soap:Envelope>
Here is how you should get this working:
1.Edit the user profile properties in the user profile service application and add this external email address to one of the property. Please plan your user profile properties accordingly so that the next import doesn't override these fields that were updated with the external email address. Finally, run the User Profile to SharePoint full synchronization job which will sync all your site collections user info table with these email addresses.
Please confirm that the users email address is actually resolving the user ID by creating the SharePoint 2013 workflows:). The logic here is to make sure that the site to which you are publishing the workflows recognizes this email address (external). Forthat matter a new user who is in your AD but hasn't been added to the SharePoint site also faces the same problem. That's the reason we are so specific in using "VALID SHAREPOINT USER"
2.We strongly recommend you to use/experience the new Workflow Manager (Workflow Foundation 4.0 for SharePoint 2013) as its more robust and delivers best performance over 2010. (A new feature always has advantages:))
However, if you wanted to use 2010 workflows as well, here is the work around:
a.Create a workflow called Email using SharePoint 2010 workflows on the same list so that you could utilize the fields and then add Email these users step. Select the external email addresses here (SharePoint 2010 workflows doesn't validate user againstREST upon adding).
b.Design your 2013 workflows per your requirement but whenever you have to add a step "Email these users", call the 2010 workflow you just created before.
This way, your 2013 workflow does the job for you and where ever you are calling the 2010 workflow within 2013 that does deliver the emails to the external users also. I have tested this and it works greatly.
This article applies to SharePoint 2013 workflows. (Products: SharePoint 2013 & SharePoint online)