EmailModule & format text

Ask general questions here.
SanMan
Posts: 150
Joined: Tue Apr 13, 2010 9:59 am

EmailModule & format text

Post by SanMan » Fri Apr 20, 2018 9:24 am

Hi,

is it possible to format (e.g. bodytext) text that EmailModule sent? (bold, underline...)

McTurtle
Posts: 191
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: EmailModule & format text

Post by McTurtle » Mon Apr 23, 2018 11:59 am

Hey,

Yea, it's possible. However, you will have to modify the code of the automation helpers. Do this:
1. Open the EmailLibrary.cs file:
EmailLibrary.png
EmailLibrary.png (11.61 KiB) Viewed 136 times
2. After the declaration of the new MailMessage in line 88 add the following:
IsBodyHTML.png
IsBodyHTML.png (4.27 KiB) Viewed 136 times
The automation helpers are using System.Net.Mail. More about IsBodyHtml under the following link: Link

3. You can now add the HTML code into the string of the Body parameter and it should be interpreted as HTML by your mail client:
HtmlCode.png
HtmlCode.png (7.04 KiB) Viewed 136 times
Does this help?

Regards,
McTurtle

SanMan
Posts: 150
Joined: Tue Apr 13, 2010 9:59 am

Re: EmailModule & format text

Post by SanMan » Mon Apr 23, 2018 1:36 pm

Thank you so much for the answer!

It really helped me.