Question

MESSAGE_STRING and event action NOTIFY_CHECKLIST_RESP_EMPLOYEE

  • 28 May 2021
  • 6 replies
  • 215 views

Userlevel 7
Badge +20

Hi Team.

As per which option used in Setup IFS connect ( for MAIL_SENDER1)

 

 

Email output generated from event action NOTIFY_CHECKLIST_RESP_EMPLOYEE will be changed as below;

 

Result 1 ( text/html )

 


Result 2 ( text/Plain)


As you can observe above, one option does not make Message_string work properly and other option does not make “Click Here” link work.

So Would there be anyway both could be worked as same time ?

( Line breakers option does not work on MESSAGE_STRING)
 

 


 


6 replies

Userlevel 6
Badge +10

Why dont you put a <br/> tag in your example 1. That will add new lines in the output message?

Userlevel 7
Badge +20

Why dont you put a <br/> tag in your example 1. That will add new lines in the output message?

Hey there,

 <br/> does not work in Message_string 

Userlevel 6
Badge +10

Really, this works for us.

 

Userlevel 7
Badge +20

Really, this works for us.

 

Hey Again,

Thanks for your feedback.

In my initial comment, you can notice blue URL link in Results 2 which is not there in Result 1, this was generated from Message_string.

Even  <br/> could be used to break lines, I still end up in issue because text/html only give Click Here option no Message_string URL link and text/Plain gives Message_string link but no Click here option.

Userlevel 3
Badge +4

Hi Xavier

"<a>" is the html tag which is used to define a hyperlink and these kind of html tags are not supported in a plain text format.
Hence the 'Click Here' is shown as a link (blue colour- undelined) only in HTML.
As I know, we couldn't implement the same in both text and html formats due to this, under the existing functionality of the application.

Sameera.

Userlevel 7
Badge +31

 Hi @Xavier Fernando     ,

Just had a quick look at the code in CompanyPerson.plsql and particularly at Send_Per_Employee_Mails and Notify_Responsible_Person methods. 

When you look at the code, it is using line feeds - “chr(10)” and carriage returns - “chr(13)” for new lines when constructing the message string. Therefore it is safe to conclude that this is using text/plain MIME type instead of text/html. 

IF msg_str_ IS NOT NULL THEN

            msg_str_ := msg_str_ || chr(10) || chr(13);

         END IF;



         msg_str_ := msg_str_ || Language_SYS.Translate_Constant(lu_name_, 'TERMPROCESSACT: Termination Process Activity: ') || term_process_table_(k_).termination_process_act

                              || ' - ' || Language_SYS.Translate_Constant(lu_name_, 'TERMPROCACTDUEDATE: Due Date: ') || TRUNC(term_process_table_(k_).actual_due_date) || '    '; 

Mail Sender always relies on the user to set the correct formatting for the message. In this case, how the message is constructed in core code should be taken into account when formatting rest of the message. If you change the type to text/html in Mail Sender, you will lose the line feeds set in core code as you see in the output. Therefore the correct MIME type for this is text/plain and the message should be formatted accordingly.

According to my understanding, this is per design, not a bug. 

Reply