I'm trying to send an email using c# sharepoint library. Though I'm getting an error that reads...
Error in test: Object reference not set to an instance of an object.
The code I'm executing is as follows. It's fairly simple, though I can't figure out where I'm going wrong.
string SPSite = "spsite";
using(SPSite objSite = new SPSite(SPSite))
{
using(SPWeb oweb = objSite.OpenWeb())
{
SPUtility.SendEmail(oweb, false, false, "email@email.com", "Title test", "this is the body");
}
}