Code Sample : How to programmatically send an email in SharePoint

If your SharePoint farm has been configured to use an SMTP server, then it is possible to send an email in code using the SPUtility class. The c# code below illustrates how to send a mail and return an XML string outlining what was sent for logging purposes :

Leave a Reply 1 comment

Shihad - January 9, 2018 Reply

Is there any way to add attachment ?

Leave a Reply: