Page 1 of 1

add default text to body of e-mail to be sent

Posted: Wed Sep 30, 2015 4:08 am
by Femmy

I'm trying to add a default text in the body of an e-mail message. I have created 2 mail forms. And I read those, now I want to use method add_default_text to add this to the body.
I'm working on BT126H_MAIL/send_screeen in the do_prepare_ouput. I have made a Z-class ZL_CRM_SEND_SCREEN_IMPL, and I have redefined method do_prepare_output. In this method I allready add an attachement to the newly create e-mail. This part works. now I want to add a text in the body of the mail, and this I do not get working. If we put the parameter that ignores all enhancements made (go back to the standard); it does work, and (when selecte) the default text (1 of the 2 created mail forms) appears in the body text.
Has anyone done something like this before? can anyone tell me how te correctly fill parameters for method add_default_text?

I use cl_crm_pml_mail_form_api=>read_text to read the mail form. Than I do
lv_body_text = cl_crm_pml_mail_form_exec=>convert_xstring_to_string( iv_xstring = ls_text-text ). to get string with text.

And than I want to use method add_default_text to add this text to the body. I hope anybody can tell me if this is the right way to go.
Thanks in advance.