Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to send an email using plugin late bound?

(0) ShareShare
ReportReport
Posted on by

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

  • Community Member Profile Picture
    on at
    RE: How to send an email using plugin late bound?

    Thanks bro...

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: How to send an email using plugin late bound?

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans