web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

PLUGIN: Create Email and Change Font Color

(0) ShareShare
ReportReport
Posted on by 180

Is it possible to change the font color in the body of an email that is created from a C# Plugin? If so, how?

*This post is locked for comments

I have the same question (0)
  • ashlega Profile Picture
    34,477 on at

    You can only do it if you use HTML in the description field of the email.

    Here is how you can create/send emails:

    msdn.microsoft.com/.../hh210217.aspx

    So you just need to put html-formatted text into the description field..

  • Mike Karls Profile Picture
    180 on at

    I know how to create and send an email.

    What I don't know how to do is insert the HTML into the description field.

  • Verified answer
    ashlega Profile Picture
    34,477 on at

    Ah.. ok. Nothing special - just throw in HTML formatting there:) Should still work:

    crmsaurin.blogspot.ca/.../creating-email-through-plugin-sdk-in.html

  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Mike Karls,

    Try using the code below.

                // Create the 'From:' activity party for the email
                ActivityParty fromParty = new ActivityParty
                {
                    PartyId = new EntityReference(SystemUser.EntityLogicalName, _userId)
                };
    
                // Create the 'To:' activity party for the email
                ActivityParty toParty = new ActivityParty
                {
                    PartyId = new EntityReference(Contact.EntityLogicalName, _contactId)
                };
    
                // Create an e-mail message.
                Email email = new Email
                {
                    To = new ActivityParty[] { toParty },
                    From = new ActivityParty[] { fromParty },
                    Subject = "SDK Sample e-mail",
                    Description = "<font color=\"red\">This is some text!</font>",
                    DirectionCode = true
                };
                _emailId = _serviceProxy.Create(email);

    Hope this helps.

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    As suggested can create store html string having formatting tags and them can simply place it over email body, it will work. I have done this for sending formatted reports over email.

    Thanks

  • Mike Karls Profile Picture
    180 on at

    Thank you!

  • Mike Karls Profile Picture
    180 on at

    Thank you!!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans