Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

How to send mail using C# in Sharepoint 2013? I forgot anything?

$
0
0

Example source (C#):

string webUrl ="http://sharepoint.example.com/";EmailProperties properties =newEmailProperties();
properties.To=newstring[]{"email@example.com"};
properties.Subject="Test subject";
properties.Body="Test body";ClientContext context =newClientContext(webUrl);Utility.SendEmail(context, properties);

context.ExecuteQuery();// ServerException thrown here
context.Dispose();

Error message:

A recipient must be specified.


Viewing all articles
Browse latest Browse all 25064

Trending Articles



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