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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Send HTML content as body of Email and how to add reply to address

(0) ShareShare
ReportReport
Posted on by

Hello Everyone

How to send the body of an email in HTML format,

I am able to do it as a string but not as HTML

also how would one specify a reply to address so that when a user replies to the email , the recipients address is the email specified by us in the reply to email.

This is the piece of code i'm using as of now to send the email

mailMessage = new System.Net.Mail.MailMessage(mailFrom, mailTo);

mailMessage.set_Body(body);

Regards,

Hitesh

I have the same question (0)
  • Suggested answer
    Umesh Pandit Profile Picture
    9,315 User Group Leader on at

    Hello Hitesh,

    Please check links might be some section may work for you:

    ax.docentric.com/.../

    ax.docentric.com/.../

  • Verified answer
    Martin Dráb Profile Picture
    237,963 Most Valuable Professional on at

    Set IsBodyHtml property to true.

    Note that you can X++ class SysMailerMessageBuilder to build MailMessage. When calling setBody(), provide an HTML string in the first parameter. You don't even have to set the second parameter (_isHtml) because it defaults to true.

  • Community Member Profile Picture
    on at

    Thanks Martin,

    As always worked like a charm :-)

    Regards,

    Hitesh.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans