bizhuka / xtt

ABAP template engine for Excel, Word, Html & Pdf
https://bizhuka.github.io/xtt/
Apache License 2.0
35 stars 7 forks source link

send_as_body method #7

Closed monty79 closed 4 years ago

monty79 commented 4 years ago

May be useful when creating e-mail message body from .html templates.

bizhuka commented 4 years ago

Hi thanks for a suggestion but it seems to me that zcl_xtt_html class already implemented sending e-mail functionality

if you have any questions you could write to me modekz@gmail.com

image

      " Create text in HTML " @see -> https://github.com/bizhuka/xtt/wiki
      DATA(lo_xtt) = NEW zcl_xtt_html(
       iv_as_email_body = abap_true " new parameter (just use own send method)
       io_file          = NEW zcl_xtt_file_raw( iv_name   = 'dummy.html' "#EC NOTEXT
                                                iv_string = ms_option-email_body ) ).

      " Add data
      lo_xtt->merge( iv_block_name = 'R' is_block = ls_root ).

      " No attachment just use own text as body
      lo_xtt->send(
       it_recipients = lt_recipient
       iv_subject    = ms_option-email_subject
       iv_body       = '' " <--- use own data instead of email body      "#EC NOTEXT
       iv_express    = abap_true
       iv_commit     = abap_true ).
monty79 commented 4 years ago

Ah, thanks, I didn't seen this new feature since had old xtt version in my own system!

bizhuka commented 4 years ago

You are welcome!

and from 2020 you have to install another package for XTT https://github.com/bizhuka/eui