cancel
Showing results for 
Search instead for 
Did you mean: 

Make text bold in the email content generated through UDF

Former Member
0 Kudos

All,

I am generating an email thorugh UDF by invoking a Mail channel. The scenario works fine, however it's the minor cosmetic issue that is bothering me.

Code used is mentioned below. In this how do I make some parts of the content bold and underlined. I have tried <b></b> but that does not work. For example in this XML below, how do I make strFieldName bold and lets say "is  missing" underlined.

String smtpXML ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"

+"<ns2:Mail xmlns:ns2=\"Mandatory" _mce_href="http://sap.com/xi/XI/Mail/30\"><Subject>Mandatory">http://sap.com/xi/XI/Mail/3... Field Missing</Subject><From>xyz@xyz.com</From><To>xyz@xyz.com</To><Content>"

+"Dear User,\n\nMandatory Field '"+strFieldName+"' is missing. "+ "Please find below the interface details"+"\n\nInterface Name: "+headerField1+"\n\nInterface NameSpace: "+headerField2+"\n\nSender System: "+headerField3+"\n"+"Receiver  System: "+headerField4+"\n\nPlease populate all the mandatory fields and resend the message.\n\nRegards,\nPI Team. </Content></ns2:Mail>";

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

pedro_baroni3
Active Contributor
0 Kudos

Hi Vicky,

Try set the tag <ContentType> with "text/html; charset=ISO-8859-1:".

And fill the Content with HTML, like:

"<Content>"

+"&lt;html&gt;

&lt;head&gt;

&lt;title&gt;Title&lt;/title&gt;

&lt;/head&gt;

&lt;body&gt;

Dear User,&lt;br/&gt;&lt;br/&gt;Mandatory Field '"+strFieldName+"' is missing. "+ "Please find below the interface details"+"&lt;br/&gt;&lt;br/&gt;Interface Name: "+headerField1+"&lt;br/&gt;&lt;br/&gt;Interface NameSpace: "+headerField2+"&lt;br/&gt;&lt;br/&gt;Sender System: "+headerField3+"&lt;br/&gt;"+"Receiver  System: "+headerField4+"&lt;br/&gt;&lt;br/&gt;Please populate all the mandatory fields and resend the message.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;&lt;b&gt;PI Team.&lt;/b&gt;

&lt;/body&gt;

&lt;/html&gt;"

+"</Content>"

Regards,

Pedro Baroni

stefan_grube
Active Contributor
0 Kudos

A <b> would no help you in a plain text.

You need to create HTML, but I reckon the effort would increase the benefit.