Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

Sending emails from SharePoint Woes

$
0
0

I am running Office365 E3 w/SharePoint Online. I am in the process of developing a SharePoint App, and one of the things I need to do is send an email when someone submits a form. From what I have learned there is no way to do this using CSOM/JSOM/REST for the hosted SharePoint Online; there is no SSOM for SharePoint Online. Folks recommend creating a custom list and having 3 fields: To, Subject, Body. And then using SharePoint Designer to create a workflow that runs when a new item is submitted to use the Current Item fields to address email fields and send the message. Sounds easy enough...

I keep getting the following error when I check the stage status. Right now, I am doing this by hand, the code is not interacting with this test list/workflow in any way:

RequestorId: ea5a2812-4f98-e816-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 400 {"error":{"code":"-2130242040, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The e-mail message cannot be sent. Make sure the e-mail has a valid recipient."}}} {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"X-SP-SERVERSTATE":["ReadOnly=0"],"SPClientServiceRequestDuration":["163"],"SPRequestGuid":["ea5a2812-4f98-e816-8e90-ffb8d085de34"],"request-id":["ea5a2812-4f98-e816-8e90-ffb8d085de34"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["16.0.0.3312"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Wed, 08 Oct 2014 21:42:42 GMT"],"P3P":["CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\""],"Server":["Microsoft-IIS/7.5"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity Throw If Sequence Sequence TryCatch Sequence Microsoft.SharePoint.WorkflowServices.Activities.RetryForEmail HttpPost Sequence If Sequence Microsoft.SharePoint.WorkflowServices.Activities.Email Stage 1 Sequence Flowchart Sequence Email Workflow for Test Email List.WorkflowXaml_acd7d7cc_732c_4594_ada4_6c4518d438d8

I don't speak SharePoint, so I have no real idea what this means. The address I am submitting in the form is my email address, the one I used as my username/is associated with my account when I log into SharePoint/Office365. My only guess is that I either need to format the field that holds the email address differently or there is some obscure permission I need to change somewhere.

If I edit the workflow and specify my name as the recipient of the email (instead of getting it from the list) that works every time. Unfortunately, the recipient(s) will vary in the application, and I don't want to have to create a separate workflow for every possible outcome.

Any ideas?


Viewing all articles
Browse latest Browse all 8089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>