Announcements
No record found.
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
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..
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.
Ah.. ok. Nothing special - just throw in HTML formatting there:) Should still work:
crmsaurin.blogspot.ca/.../creating-email-through-plugin-sdk-in.html
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.
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
Thank you!
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
JS-09031509-0 3
AS-17030037-0 2
Mark Eckert 2