How to change default email font set to Times New Roman.

gattonerogattonero Member Posts: 9
Hello Everybody,

When we send an email from NAV (contacts), it creates an email with the font set to Times New Roman.

How do I go about setting the font to something else, say Arial and 0pt ?

Thanks in advance for any assistance.

PS. We use Outlook and Navision 2009 R2

Best regards

Comments

  • ppavukppavuk Member Posts: 334
    I think you need to wrap your e-mail body into html tag <P font=helvetica, style=bold> email body </p>.


    something like this example. Do not forget to switch smtpmail automation to html mode.
    
    Line[1] := '<html xmlns="http://www.w3.org/1999/xhtml" > ';
    Line[2] := '<p style="font-family:verdana;color:#636163;font-size:12px">';
    Line[3] := '</p>';
    Line[4] := '</html>';
    
    
     SMTPMail.CreateMessage(
         TextFrom,  //SenderName
         EmailFrom, //SenderAddress
         e-mail, //Recipients
         TextLine[1], //Subject
         '', //Body
         TRUE // HtmlFormatted
         );
     SMTPMail.AppendBody(Line[1]);
     SMTPMail.AppendBody(Line[2]);
     SMTPMail.AppendBody(TextLine[1]);
     SMTPMail.AppendBody(Line[3]);
     SMTPMail.AppendBody(Line[4]);
     SMTPMail.Send();
    
    
  • gattonerogattonero Member Posts: 9
    Hi,

    could you please tell me, where I have to change and put this code you send me?

    Thanks a lot
  • ppavukppavuk Member Posts: 334
    Somewhere in mail codeunit I guess :) Sorry, but I do not writing any code for free :) I can give you an idea, but you need to write your own code by yourself.

    Normally, I would charge hour for this work - so no reason to do it free :)
  • gattonerogattonero Member Posts: 9
    Thanks for Idea :wink: I'll check it.
Sign In or Register to comment.