Hello experts,
how to send an email using plugin by late bound?
i used below code but i could not done with that..please help me
Entity entity = (Entity)context.InputParameters["Target"];
Entity from = new Entity("activityparty");
from["partyid"] = new EntityReference("systemuser", context.UserId);
Entity to = new Entity("activityparty");
to["partyid"] = new EntityReference("systemuser", context.UserId);
Entity mail = new Entity("email");
mail["from"] = new Entity[] { from };
mail["to"] = new Entity[] { to };
mail["subject"] = "";
mail["description"] = "";
mail["directioncode"] = true;
Guid mailid= service.Create(mail);
*This post is locked for comments
Thanks bro...
Hello,
You're missing piece that will send an email. It should be something similar to following:
service.Execute(new SendEmailRequest()
{
EmailId = mailid,
IssueSend = true,
TrackingToken = string.Empty
});
Good luck.
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6