Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

proper way to send email from plugin?

$
0
0

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?


Viewing all articles
Browse latest Browse all 82002

Trending Articles