Hello - Is this the proper way to send an email from a plugin?:
var message = "test";
var emailId = service.Create(new Email
{
To = new List<ActivityParty>
{
new ActivityParty
{
PartyId = new EntityReference(Contact.EntityLogicalName, contactId)
}
},
Subject = message,
Description = message,
RegardingObjectId = new EntityReference(Incident.EntityLogicalName, caseId)
});
Should this code alone be enough to send an email from a plugin or is a different technique or more code needed?