Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

HTML Email Body

Posted on by Microsoft Employee

Hi NAV experts,

How to modify the current email body template to look like HTML format?

I have read on many posts in the forum that making HTML format of email body will require heavy customisation.

All I need to do for the email body is as below:

- Centre aligned the body

- Put the company logo as the header

- Make all the font to be grey in colour and certain font

- Put a footer which is a generic company email, facebook and twitter page.

Is it possible?

Thanks

Susy

*This post is locked for comments

  • manish.yadav Profile Picture
    manish.yadav 1,835 on at
    RE: HTML Email Body

    Hello Dear,

    I have provided you a some hint/syntax to update your already written code. Now, You can use these syntaxces to update the code. If you still unable to do that please send the the some lines of your code, I will provide you a some idea.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HTML Email Body

    Thank you Suresh & MKY,

    Now, where do I put these codes in?

    Do I add it to the Report that is developed to run the email job, or is it replacing Codeunit 400 SMTP Email?

    Regards,

    Susy

  • Verified answer
    manish.yadav Profile Picture
    manish.yadav 1,835 on at
    RE: HTML Email Body

    Hello Dear,

    I have write a some tips to modify the mail body using the HTML. I have tried by own.

    Alignment In HTML.:

    <td align="left">

    <td align="right">

    <td align="center">

    <td align="justify">

    <td align="char">

    Add two row or columns:

    <th rowspan="2"></th>

    <th colspan="3"></th>

    Text bold in HTML:

    Mail.AppendBody('<b>From</b>');

    Using colour in TExt:

    Mail.AppendBody('<th><p style='color:darkblue;'>SO No.</p></th>');

    Mail.AppendBody('<th><p style='color:Green;'>SO Date</p></th>');

    Mail.AppendBody('<th><p style='color:Red;'>SO Due Date</p></th>');

    Mail.AppendBody('<th><p style='color:Maroon;'>SO Invoice Date</p></th>');

    If You want to design the columns as per requirement, You can try like that:

    Mail.AppendBody('<th align="right" colspan="3">Opening Balance</th><th colspan="3">'+FORMAT

    (OpeningDRBal)+'</th>');

    Draw A line in Mail Body:

    Mail.AppendBody('<HR>');

    Create A one blank space:

    Mail.AppendBody('<br>');

    Create A two blank space:

    Mail.AppendBody('<br><br>');

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: HTML Email Body

    Susy,

    Yes its possible you just need to use appropriate HTML tags when adding the body. For example check the below link where Saurav explained how to insert logo into the email.

    https://community.dynamics.com/nav/b/sauravdhyanimicrosoftdynamicsnav/archive/2015/08/10/nav-2015-use-email-with-company-logo-and-url

  • Suggested answer
    Maneesha Profile Picture
    Maneesha 5,889 on at
    RE: HTML Email Body

    Hi Susy K ,

    Refer follow link this will help you to solve the issue

    www.mapilab.com/.../insert-html-into-outlook-email-message

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans