How to use MOSS 2007 Out of Box Send Mail function & SPUtility

Hi,

            Some of us might have encountered situation, where we might have to send mails to the users. But we might not interested in using the .net Send mail functionality (which involves storing the SMTP ip address).  MOSS comes with a namesapce Microsoft.SharePoint.Utilities,  which provides us this functionality.

 Include this namespace in your code.

           using Microsoft.SharePoint.Utilities;

Use this function,

          SPUtility.SendEmail

That's it, as simple as that. You can explore other functions exposed by SPUtility as well.. Happy Programming.

 Regards

Satheesh Palaniswamy

 

Leave a Reply