Using FM "SO_DOCUMENT_SEND_API1"  to send mail without attachment

Hi,
What are the parameters to be passed and their values
to send a mail using SO_DOCUMENT_SEND_API1
EXPORT PARAMETERS :
       document_data              = ?
      sender_address             = sy-userid
      sender_address_type        = 'INT'
      commit_work                = 'X'
    TABLES :
      packing_list               =  ?
      contents_bin               =  ?
The content of the mail is not being displayed in the mail.
Thanks in advance.
Regards,Harika

Hi Harika,
Check below piece of code.
*&      Form  mail_body
*       text
*  -->  p1        text
*  <--  p2        text
FORM mail_body.
  DATA:  l_l1 TYPE i.
  CONSTANTS: lc_0 VALUE '0',
             lc_1 VALUE '1',
             lc_raw(3) TYPE c VALUE 'RAW'.
  REFRESH: i_objtxt[],
           i_objpack[].
  CLEAR: wa_objtxt.
  SORT i_fail BY type.
* MAIL BODY
* Customer Number
  CONCATENATE text-t18
              w_kunnr
              INTO wa_objtxt
              SEPARATED BY space.
  APPEND wa_objtxt TO i_objtxt.
  CLEAR wa_objtxt.                        "blank line
  APPEND wa_objtxt TO i_objtxt.
*  Complete Payment Doc Nos
  READ TABLE i_fail WITH KEY type = c_comp
                    TRANSPORTING NO FIELDS
                    BINARY SEARCH.
  IF sy-subrc EQ 0.
    wa_objtxt = text-t16.
    APPEND wa_objtxt TO i_objtxt.
    CLEAR: wa_fail, wa_objtxt.
    APPEND wa_objtxt TO i_objtxt.
    MOVE: text-t23   TO wa_objtxt,
          text-t24   TO wa_objtxt+17(5),
          text-t25   TO wa_objtxt+22(6),
          text-t26   TO wa_objtxt+40(18).
    APPEND wa_objtxt TO i_objtxt.
    CLEAR wa_objtxt.
    LOOP AT i_fail INTO wa_fail WHERE type EQ c_comp.
      DIVIDE wa_fail-disper BY 100.
      MOVE: wa_fail-belnr   TO wa_objtxt,
            wa_fail-buzei   TO wa_objtxt+17(5),
            wa_fail-wrbtr   TO wa_objtxt+22(16),
            wa_fail-disper  TO wa_objtxt+40(18).
      APPEND wa_objtxt TO i_objtxt.
      CLEAR: wa_fail, wa_objtxt.
    ENDLOOP.
  ENDIF.
*  Partial Payment Doc Nos
  READ TABLE i_fail WITH KEY type = c_part
                    TRANSPORTING NO FIELDS
                    BINARY SEARCH.
  IF sy-subrc EQ 0.
    wa_objtxt = text-t17.
    APPEND wa_objtxt TO i_objtxt.
    CLEAR wa_fail.
    CLEAR: wa_objtxt.
    APPEND wa_objtxt TO i_objtxt.
    MOVE: text-t23   TO wa_objtxt,
          text-t24   TO wa_objtxt+17(5),
          text-t25   TO wa_objtxt+22(6),
          text-t26   TO wa_objtxt+40(18).
    APPEND wa_objtxt TO i_objtxt.
    CLEAR wa_objtxt.
    LOOP AT i_fail INTO wa_fail WHERE type EQ c_part.
      DIVIDE wa_fail-disper BY 100.
      MOVE: wa_fail-belnr   TO wa_objtxt,
            wa_fail-buzei   TO wa_objtxt+17(5),
            wa_fail-wrbtr   TO wa_objtxt+22(16),
            wa_fail-disper  TO wa_objtxt+40(18).
      APPEND wa_objtxt TO i_objtxt.
      CLEAR: wa_fail, wa_objtxt.
    ENDLOOP.
  ENDIF.
* MAIL BODY-LENGTH
  DESCRIBE TABLE i_objtxt LINES l_l1.
  CLEAR wa_objpack-transf_bin.
  wa_objpack-head_start = lc_1.
  wa_objpack-head_num = lc_0.
  wa_objpack-body_start = lc_1.
  wa_objpack-body_num = l_l1.
  wa_objpack-doc_type = lc_raw.
  APPEND wa_objpack TO i_objpack.
*SUBJECT
  CLEAR wa_doc_chng.
  wa_doc_chng-obj_name  = text-t15.
  wa_doc_chng-obj_descr = text-t15.
ENDFORM.                    " mail_body
*&      Form  send_mail
*       text
FORM send_mail.
  CONSTANTS: lc_c       TYPE so_escape VALUE 'C',
             lc_mode(3) TYPE c         VALUE 'INT'.
  CLEAR: wa_reclist, i_reclist[].
*Recipient list
  wa_reclist-receiver = text-t14.       "DL
  wa_reclist-rec_type = lc_c.
  APPEND wa_reclist TO i_reclist.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data                    = wa_doc_chng
        put_in_outbox                    = c_x
*     IMPORTING
*       SENT_TO_ALL                      =
*       NEW_OBJECT_ID                    =
      TABLES
        packing_list                     = i_objpack
*       OBJECT_HEADER                    =
*       CONTENTS_BIN                     =
        contents_txt                     = i_objtxt
*       CONTENTS_HEX                     =
*       OBJECT_PARA                      =
*       OBJECT_PARB                      =
        receivers                        = i_reclist
     EXCEPTIONS
       too_many_receivers               = 1
       document_not_sent                = 2
       document_type_not_exist          = 3
       operation_no_authorization       = 4
       parameter_error                  = 5
       x_error                          = 6
       enqueue_error                    = 7
       OTHERS                           = 8.
*    IF SY-SUBRC <> 0.
*    ENDIF.
  IF sy-subrc IS INITIAL.
*Send mail immediately
    SUBMIT rsconn01 USING SELECTION-SET lc_mode AND RETURN.
    CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.
  ELSE.
    RAISE mail_not_sent.
  ENDIF.
ENDFORM.                    " send_mail
Thanks,
Vinod.

Similar Messages

  • Sending mail without attachment file

    Hi Sapfans:
    I would like to send mail without attachment file, just a notice,
    needing multiple receiver, can change the mail title,
    Which function shoud I use?
    I just found out sending mail with attachment file there,
    Thanks a lot!

    Hi Alchie,
    Please take a look at my example below. It sens e-mail to multiple recipients without attachments.
    FUNCTION-POOL zts0001                    MESSAGE-ID sv.
    INCLUDE lsvimdat                                . "general data decl.
    INCLUDE lzts0001t00                             . "view rel. data dcl.
    */ Author: Aris Hidalgo
    */ Created on: September 7, 2006
    */ Purpose of program: This will send out e-mails to specified users in
    */ custom table ZSHIPTO_EMAIL whenever records have been deleted or
    */ modified via the maintenance view of ZTS0001. The changes will also
    */ be reflected in custom table ZTS_STPGEOLOC.
    TABLES: zts_stpgeoloc,
            zshipto_email,
            kna1.
    FIELD-SYMBOLS: <fs_old_total> TYPE ANY.
    *       CLASS lcl_main DEFINITION ABSTRACT
    CLASS lcl_main DEFINITION ABSTRACT.
      PUBLIC SECTION.
        TYPES: BEGIN OF t_zts0001_old,
                kunnr    TYPE zts0001-kunnr,
                cdseq    TYPE zts0001-cdseq,
                zaddress TYPE zts0001-zaddress,
                zcperson TYPE zts0001-zcperson,
                zcnumber TYPE zts0001-zcnumber,
               END OF t_zts0001_old.
        TYPES: BEGIN OF t_zts0001_new,
                kunnr    TYPE zts0001-kunnr,
                cdseq    TYPE zts0001-cdseq,
                zaddress TYPE zts0001-zaddress,
                zcperson TYPE zts0001-zcperson,
                zcnumber TYPE zts0001-zcnumber,
               END OF t_zts0001_new.
        TYPES: BEGIN OF t_zts_stpgeoloc,
                kunnr    TYPE zts_stpgeoloc-kunnr,
                cdseq    TYPE zts_stpgeoloc-cdseq,
                zaddress TYPE zts_stpgeoloc-zaddress,
                zcperson TYPE zts_stpgeoloc-zcperson,
                zcnumber TYPE zts_stpgeoloc-zcnumber,
               END OF t_zts_stpgeoloc.
        TYPES: BEGIN OF t_del_entries,
                kunnr    TYPE zts0001-kunnr,
                cdseq    TYPE zts0001-cdseq,
                zaddress TYPE zts0001-zaddress,
                zcperson TYPE zts0001-zcperson,
                zcnumber TYPE zts0001-zcnumber,
                name1    TYPE kna1-name1,
               END OF t_del_entries.
        TYPES: BEGIN OF t_modified_entries,
                kunnr       TYPE zts0001-kunnr,
                cdseq       TYPE zts0001-cdseq,
                old_address TYPE zts0001-zaddress,
                new_address TYPE zts0001-zaddress,
                old_person  TYPE zts0001-zcperson,
                new_person  TYPE zts0001-zcperson,
                old_number  TYPE zts0001-zcnumber,
                new_number  TYPE zts0001-zcnumber,
                name1       TYPE kna1-name1,
               END OF t_modified_entries.
        DATA: gt_zts0001_old      TYPE STANDARD TABLE OF t_zts0001_old,
              gt_zts0001_new      TYPE HASHED   TABLE OF t_zts0001_new
                                           WITH UNIQUE KEY kunnr cdseq,
              gt_zts_stpgeoloc    TYPE STANDARD TABLE OF t_zts_stpgeoloc,
              gt_del_entries      TYPE STANDARD TABLE OF t_del_entries,
              gt_modified_entries TYPE STANDARD TABLE OF t_modified_entries,
              gt_zshipto_email    TYPE STANDARD TABLE OF zshipto_email,
              t_maildata          TYPE sodocchgi1,
              gt_mailtxt          TYPE STANDARD TABLE OF solisti1,
              gt_mailrec          TYPE STANDARD TABLE OF somlreci1.
        DATA: v_old_total     TYPE i,
              v_new_total     TYPE i,
              v_flag(1)       TYPE c,
              v_counter(1)    TYPE c,
              v_contents(255) TYPE c.
    ENDCLASS.
    *       CLASS lcl_get_old_recs DEFINITION
    CLASS lcl_get_old_recs DEFINITION INHERITING FROM lcl_main.
      PUBLIC SECTION.
        METHODS: export_old_recs.
    ENDCLASS.
    *       CLASS lcl_get_old_recs IMPLEMENTATION
    CLASS lcl_get_old_recs IMPLEMENTATION.
      METHOD export_old_recs.
        SELECT kunnr cdseq zaddress zcperson zcnumber
        FROM zts0001
        INTO TABLE gt_zts0001_old.
        v_old_total = sy-dbcnt.
        ASSIGN v_old_total TO <fs_old_total>.
        EXPORT gt_zts0001_old = gt_zts0001_old TO MEMORY ID 'AVH'.
        CLEAR gt_zts0001_old. REFRESH gt_zts0001_old.
      ENDMETHOD.
    ENDCLASS.
    *       CLASS lcl_old_and_new DEFINITION
    CLASS lcl_old_and_new DEFINITION INHERITING FROM lcl_main.
      PUBLIC SECTION.
        METHODS: compare_old_and_new.
    ENDCLASS.
    *       CLASS lcl_old_and_new IMPLEMENTATION
    CLASS lcl_old_and_new IMPLEMENTATION.
      METHOD compare_old_and_new.
        DATA: wa_del_entries    LIKE LINE OF gt_del_entries.
        FIELD-SYMBOLS: <fs_old> LIKE LINE OF gt_zts0001_old,
                       <fs_new> LIKE LINE OF gt_zts0001_new.
        SELECT kunnr cdseq zaddress zcperson zcnumber
        FROM zts0001
        INTO TABLE gt_zts0001_new.
        v_new_total = sy-dbcnt.
        IF v_new_total <> <fs_old_total>.
          IMPORT gt_zts0001_old = gt_zts0001_old FROM MEMORY ID 'AVH'.
          LOOP AT gt_zts0001_old ASSIGNING <fs_old>.
            READ TABLE gt_zts0001_new WITH TABLE KEY kunnr = <fs_old>-kunnr
                                                     cdseq = <fs_old>-cdseq
                                                     ASSIGNING <fs_new>.
            IF sy-subrc <> 0.
              MOVE-CORRESPONDING <fs_old> TO wa_del_entries.
              APPEND wa_del_entries TO gt_del_entries.
              CLEAR wa_del_entries.
              DELETE FROM zts_stpgeoloc
              WHERE kunnr = <fs_old>-kunnr
                AND cdseq = <fs_old>-cdseq.
            ENDIF.
          ENDLOOP.
          IF NOT gt_del_entries[] IS INITIAL.
            EXPORT gt_del_entries = gt_del_entries TO MEMORY ID 'DEL'.
          ENDIF.
          REFRESH gt_zts0001_old.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    *       CLASS lcl_check_changes DEFINITION
    CLASS lcl_check_changes DEFINITION INHERITING FROM lcl_main.
      PUBLIC SECTION.
        METHODS: check_for_changes.
    ENDCLASS.
    *       CLASS lcl_check_changes IMPLEMENTATION
    CLASS lcl_check_changes IMPLEMENTATION.
      METHOD check_for_changes.
        TYPES: BEGIN OF t_zts_stpgeoloc,
                mandt    TYPE zts_stpgeoloc-mandt,
                kunnr    TYPE zts_stpgeoloc-kunnr,
                cdseq    TYPE zts_stpgeoloc-cdseq,
                zcgeoloc TYPE zts_stpgeoloc-zcgeoloc,
                zaddress TYPE zts_stpgeoloc-zaddress,
                zcperson TYPE zts_stpgeoloc-zcperson,
                zcnumber TYPE zts_stpgeoloc-zcnumber,
               END OF t_zts_stpgeoloc.
        DATA: wa_modified_entries LIKE LINE OF gt_modified_entries,
              lt_zts_stpgeoloc    TYPE HASHED TABLE OF t_zts_stpgeoloc
                                       WITH UNIQUE KEY kunnr cdseq,
              wa_zts_stpgeoloc    LIKE LINE OF lt_zts_stpgeoloc.
        FIELD-SYMBOLS: <fs_zts0001_old> LIKE LINE OF gt_zts0001_old,
                       <fs_zts0001_new> LIKE LINE OF gt_zts0001_new.
        IMPORT gt_zts0001_old = gt_zts0001_old FROM MEMORY ID 'AVH'.
        SELECT kunnr cdseq zcgeoloc zaddress zcperson zcnumber
        FROM zts_stpgeoloc
        INTO CORRESPONDING FIELDS OF TABLE lt_zts_stpgeoloc.
        SELECT kunnr cdseq zaddress zcperson zcnumber
        FROM zts0001
        INTO TABLE gt_zts0001_new.
        LOOP AT gt_zts0001_old ASSIGNING <fs_zts0001_old>.
          READ TABLE gt_zts0001_new WITH TABLE KEY
                                         kunnr = <fs_zts0001_old>-kunnr
                                         cdseq = <fs_zts0001_old>-cdseq
                                         ASSIGNING <fs_zts0001_new>.
          IF sy-subrc = 0.
            READ TABLE lt_zts_stpgeoloc WITH TABLE KEY
                                            kunnr = <fs_zts0001_new>-kunnr
                                            cdseq = <fs_zts0001_new>-cdseq
                                            INTO wa_zts_stpgeoloc.
            IF sy-subrc = 0.
              wa_zts_stpgeoloc-mandt    = sy-mandt.
              wa_zts_stpgeoloc-kunnr    = <fs_zts0001_new>-kunnr.
              wa_zts_stpgeoloc-cdseq    = <fs_zts0001_new>-cdseq.
              wa_zts_stpgeoloc-zcgeoloc = space.
              wa_zts_stpgeoloc-zaddress = <fs_zts0001_new>-zaddress.
              wa_zts_stpgeoloc-zcperson = <fs_zts0001_new>-zcperson.
              wa_zts_stpgeoloc-zcnumber = <fs_zts0001_new>-zcnumber.
              MODIFY zts_stpgeoloc FROM wa_zts_stpgeoloc.
              COMMIT WORK AND WAIT.
            ENDIF.
    *       address
            IF <fs_zts0001_old>-zaddress <> <fs_zts0001_new>-zaddress.
              MOVE: <fs_zts0001_new>-kunnr  TO wa_modified_entries-kunnr,
                    <fs_zts0001_new>-cdseq  TO wa_modified_entries-cdseq,
              <fs_zts0001_old>-zaddress TO wa_modified_entries-old_address,
              <fs_zts0001_new>-zaddress TO wa_modified_entries-new_address.
              v_flag = 1.
            ENDIF.
    *       person
            IF <fs_zts0001_old>-zcperson <> <fs_zts0001_new>-zcperson.
              MOVE: <fs_zts0001_new>-kunnr  TO wa_modified_entries-kunnr,
                    <fs_zts0001_new>-cdseq  TO wa_modified_entries-cdseq,
              <fs_zts0001_old>-zcperson TO wa_modified_entries-old_person,
              <fs_zts0001_new>-zcperson TO wa_modified_entries-new_person.
              v_flag = 1.
            ENDIF.
    *       number
            IF <fs_zts0001_old>-zcnumber <> <fs_zts0001_new>-zcnumber.
              MOVE: <fs_zts0001_new>-kunnr  TO wa_modified_entries-kunnr,
                    <fs_zts0001_new>-cdseq  TO wa_modified_entries-cdseq,
              <fs_zts0001_old>-zcnumber TO wa_modified_entries-old_number,
              <fs_zts0001_new>-zcnumber TO wa_modified_entries-new_number.
              v_flag = 1.
            ENDIF.
          ENDIF.
          IF v_flag = 1.
            APPEND wa_modified_entries TO gt_modified_entries.
            CLEAR wa_modified_entries.
          ENDIF.
    *     update ZTS_STPGEOLOC based from the modified records in ZTS0001
          IF v_flag = 1.
            CLEAR v_flag.
            UPDATE zts_stpgeoloc SET zaddress  = <fs_zts0001_new>-zaddress
                                      zcperson = <fs_zts0001_new>-zcperson
                                      zcnumber = <fs_zts0001_new>-zcnumber
                                   WHERE kunnr = <fs_zts0001_new>-kunnr
                                     AND cdseq = <fs_zts0001_new>-cdseq.
          ENDIF.
        ENDLOOP.
        IF NOT gt_modified_entries[] IS INITIAL.
        EXPORT gt_modified_entries = gt_modified_entries TO MEMORY ID 'MOD'
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    *       CLASS lcl_messages DEFINITION
    CLASS lcl_messages DEFINITION INHERITING FROM lcl_main.
      PUBLIC SECTION.
        METHODS: create_message.
    ENDCLASS.
    *       CLASS lcl_messages IMPLEMENTATION
    CLASS lcl_messages IMPLEMENTATION.
      METHOD create_message.
        FIELD-SYMBOLS: <fs_email> LIKE LINE OF gt_zshipto_email,
                       <fs_del>   LIKE LINE OF gt_del_entries,
                       <fs_mod>   LIKE LINE OF gt_modified_entries.
        DATA: wa_mailtxt LIKE LINE OF gt_mailtxt,
              wa_mailrec LIKE LINE OF gt_mailrec.
        IMPORT gt_modified_entries = gt_modified_entries
                                     FROM MEMORY ID 'MOD'.
        IMPORT gt_del_entries = gt_del_entries FROM MEMORY ID 'DEL'.
        SELECT * FROM zshipto_email INTO TABLE gt_zshipto_email
         WHERE zevent = '2'.
        IF sy-dbcnt > 0.
    */    routine for records that were deleted
          IF NOT gt_del_entries[] IS INITIAL.
            t_maildata-obj_name  = 'Record Deleted in table ZTS0001'.
            t_maildata-obj_descr = 'Record Deleted in table ZTS0001'.
            t_maildata-obj_langu = sy-langu.
            CLEAR: v_flag, v_counter.
            LOOP AT gt_zshipto_email ASSIGNING <fs_email>.
              LOOP AT gt_del_entries ASSIGNING <fs_del>.
    *           get name of dealer
                SELECT SINGLE name1 FROM kna1
                INTO <fs_del>-name1
                WHERE kunnr = <fs_del>-kunnr.
                IF v_counter IS INITIAL.
                 CONCATENATE: 'FYI: The ff record/s were deleted in tables'
                               'ZTS0001 and ZTS_STPGEOLOC by user' sy-uname
                                                          INTO v_contents
                                                         SEPARATED BY space.
                  wa_mailtxt-line =  v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                ENDIF.
                APPEND wa_mailtxt TO gt_mailtxt. "Extra space for message
                CONCATENATE: 'Dealer :' <fs_del>-kunnr '-'
                             <fs_del>-name1
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
                CONCATENATE: 'Ship-To:' <fs_del>-cdseq
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
                CONCATENATE: 'Address:' <fs_del>-zaddress
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
                CONCATENATE: 'Contact person:' <fs_del>-zcperson
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
                CONCATENATE: 'Contact number:' <fs_del>-zcnumber
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
                v_counter = 1.
              ENDLOOP.
              wa_mailrec-receiver = <fs_email>-zemail.
              wa_mailrec-rec_type  = 'U'.
              APPEND wa_mailrec TO gt_mailrec.
              CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                   EXPORTING
                        document_data              = t_maildata
                        document_type              = 'RAW'
                        put_in_outbox              = 'X'
    *                  commit_work                = 'X'
                   TABLES
    *                  object_header              = mailtxt
                        object_content             = gt_mailtxt
                        receivers                  = gt_mailrec
                   EXCEPTIONS
                        too_many_receivers         = 1
                        document_not_sent          = 2
                        document_type_not_exist    = 3
                        operation_no_authorization = 4
                        parameter_error            = 5
                        x_error                    = 6
                        enqueue_error              = 7
                        OTHERS                     = 8.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
              CLEAR:    wa_mailtxt, wa_mailrec.
              REFRESH:  gt_mailtxt, gt_mailrec.
            ENDLOOP.
          ENDIF.
          CLEAR wa_mailtxt.
          REFRESH gt_mailtxt.
    */    routine for records that were modified
          IF NOT gt_modified_entries[] IS INITIAL.
            CLEAR t_maildata.
            t_maildata-obj_name  = 'Record changed in table ZTS0001'.
            t_maildata-obj_descr = 'Record changed in table ZTS0001'.
            t_maildata-obj_langu = sy-langu.
            CLEAR v_counter.
            LOOP AT gt_zshipto_email ASSIGNING <fs_email>.
              CONCATENATE: 'FYI: The ff records were changed in tables'
                           'ZTS0001 and ZTS_STPGEOLOC by user' sy-uname
                           INTO v_contents
                           SEPARATED BY space.
              wa_mailtxt-line =  v_contents.
              APPEND wa_mailtxt TO gt_mailtxt.
              CLEAR: wa_mailtxt, v_contents.
              LOOP AT gt_modified_entries ASSIGNING <fs_mod>.
    *          get name of dealer
                SELECT SINGLE name1 FROM kna1
                INTO <fs_mod>-name1
                WHERE kunnr = <fs_mod>-kunnr.
                APPEND wa_mailtxt TO gt_mailtxt.
                CONCATENATE: 'Dealer :' <fs_mod>-kunnr '-'
                             <fs_mod>-name1
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
                CONCATENATE: 'Ship-To:' <fs_mod>-cdseq
                             INTO v_contents
                             SEPARATED BY space.
                wa_mailtxt-line = v_contents.
                APPEND wa_mailtxt TO gt_mailtxt.
                CLEAR: wa_mailtxt, v_contents.
    *           address
                IF NOT <fs_mod>-old_address IS INITIAL AND
                   NOT <fs_mod>-new_address IS INITIAL.
                  CONCATENATE: 'Address from:' <fs_mod>-old_address
                               INTO v_contents
                               SEPARATED BY space.
                  wa_mailtxt-line = v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                  CONCATENATE: 'Address to  :' <fs_mod>-new_address
                               INTO v_contents
                               SEPARATED BY space.
                  wa_mailtxt-line = v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                ENDIF.
    *           person
                IF NOT <fs_mod>-old_person IS INITIAL AND
                       NOT <fs_mod>-new_person IS INITIAL.
                  CONCATENATE: 'Contact person from:'
                               <fs_mod>-old_person
                               INTO v_contents
                               SEPARATED BY space.
                  wa_mailtxt-line = v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                  CONCATENATE: 'Contact person to  :'
                               <fs_mod>-new_person
                               INTO v_contents
                               SEPARATED BY space.
                  wa_mailtxt-line = v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                ENDIF.
    *           number
                IF NOT <fs_mod>-old_number IS INITIAL AND
                       NOT <fs_mod>-new_number IS INITIAL.
                  CONCATENATE: 'Contact number from:'
                               <fs_mod>-old_number
                               INTO v_contents
                               SEPARATED BY space.
                  wa_mailtxt-line = v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                  CONCATENATE: 'Contact number to  :'
                               <fs_mod>-new_number
                               INTO v_contents
                               SEPARATED BY space.
                  wa_mailtxt-line = v_contents.
                  APPEND wa_mailtxt TO gt_mailtxt.
                  CLEAR: wa_mailtxt, v_contents.
                ENDIF.
              ENDLOOP.
              wa_mailrec-receiver = <fs_email>-zemail.
              wa_mailrec-rec_type  = 'U'.
              APPEND wa_mailrec TO gt_mailrec.
              CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                   EXPORTING
                        document_data              = t_maildata
                        document_type              = 'RAW'
                        put_in_outbox              = 'X'
    *                  commit_work                = 'X'
                   TABLES
    *                  object_header              = mailtxt
                        object_content             = gt_mailtxt
                        receivers                  = gt_mailrec
                   EXCEPTIONS
                        too_many_receivers         = 1
                        document_not_sent          = 2
                        document_type_not_exist    = 3
                        operation_no_authorization = 4
                        parameter_error            = 5
                        x_error                    = 6
                        enqueue_error              = 7
                        OTHERS                     = 8.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
              CLEAR:    wa_mailtxt, wa_mailrec.
              REFRESH:  gt_mailtxt, gt_mailrec.
            ENDLOOP.
          ENDIF.
        ENDIF.
        FREE MEMORY ID 'AVH'.
        FREE MEMORY ID 'DEL'.
        FREE MEMORY ID 'MOD'.
      ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    *       FORM get_orig_contents_of_zts0001                             *
    */ before saving the data in the database
    FORM get_orig_contents_of_zts0001.
      DATA: get_old_recs TYPE REF TO lcl_get_old_recs.
      CREATE OBJECT get_old_recs.
      CALL METHOD get_old_recs->export_old_recs.
    ENDFORM.
    *       FORM get_rev_contents_of_zts0001                              *
    */ after saving the data in the database
    FORM get_rev_contents_of_zts0001.
      DATA: old_and_new   TYPE REF TO lcl_old_and_new,
            check_changes TYPE REF TO lcl_check_changes,
            messages      TYPE REF TO lcl_messages.
      CREATE OBJECT: old_and_new, check_changes, messages.
      CALL METHOD old_and_new->compare_old_and_new.
      CALL METHOD check_changes->check_for_changes.
      CALL METHOD messages->create_message.
    ENDFORM.
    *       FORM move_latest_date_and_user                                *
    FORM move_latest_date_and_user.
      zts0001-zcreated_by   = sy-uname.
      zts0001-zchanged_date = sy-datum.
    ENDFORM.
    Hope it helps...
    P.S. Please award points if it helps...

  • Sending mail with attachment fails on MAC Mail and WRP400.

    Sending mail with attachment fails on MAC Mail and WRP400.
    We have hundreds of WRP400 connected with Mac (Machintosh) computers. No special configurations are applied (no virtual server or DMZ). Web navigation, P2P programs and sending mail without attachment work right.
    The problem is the impossibility to send mails with medium or big size files attachment from MAC Mail.
    If we use Windows PCs or a different linksys routers (eg. WRT54G) the problem not happens.
    We have upgraded WRP400 firmware version from 1.00.06 to 2.00.05 but the result is the same. Sending mail with attachment using Mac fails.
    We tried to configure WRP400 with DMZ to a particular MAC. We tried to configure Virtual server on tcp 25 port of a MAC. The result is always the same.
    This is a WRP400 bug? Windows PCs work right. MAC and MAC mail works right with other linksys router.
    We need help. Thanks.

    The problem was fixed since beta firmware 2.00.11.
    I think that this issue was caused from a bug that decrease upload bitrate of WRP400 after some days of activity.
    See more details on Cisco forum under title "WRP400 stops responding after browsing certain websites".
    Thanks.

  • Send mail with attached file without using Repository

    Hello,
    I want to know if have a way to Send mail with attached file without using Repository.
    Regards
    Elad

    Elad,
    Check this article where a image has been picked by the file adapter and sent as an attachment to the mail adapter.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816">Sending an Image File Through XI in a File-to-Mail Scenario</a>
    For how to proceed without integration repository content look into this blog,
    <a href="/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository">How to send any data (even binary) through XI, without using the Integration Repository</a>
    Combining these 2 you have the solution.
    Regards
    Bhavesh

  • Convert Screen(spool) to PDF file sending mail with attach file

    Hi :
    I'd like convert spool list to pdf and sending file...
    so, I read thread about spool convert to PDF before,
    and know how to convert Spool to PDF file and send mail with attach file.
    but I have a problem.
    my solution as:
    step 1. Call function: "CONVERT_ABAPSPOOLJOB_2_PDF"
    step 2. Call function: "SO_NEW_DOCUMENT_ATT_SEND_API1"
    then, I got a mail with attached PDF file, but the PDF file display limited 255 line.( SO_NEW_DOCUMENT_ATT_SEND_API1 limited)
    I want to showing word is wider that 255.
    and then I find a manual method as:
    After program finished.
    Function Menu -> system -> List -> Send
    use Prog: "Create Document and Send"
    I use this prog sending mail and attached file ,
    PDF file do <b>NOT</b> have 255 word limit !
    finally. my question is, If I want sending mail as Prog: "Create Document and Send", how to do?
    which Function I have to use?...
    Please help me, Thanks!

    Hi,
    Check this sample code of sending spool as attachment to an email address..
    Parameters.
    PARAMETERS: p_email(50) LOWER CASE.
    PARAMETERS: p_spool LIKE tsp01-rqident.
    Data declarations.
    DATA: plist         LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: document_data LIKE sodocchgi1.
    DATA: so_ali        LIKE soli OCCURS 100 WITH HEADER LINE.
    DATA: real_type     LIKE soodk-objtp.
    DATA: sp_lang       LIKE tst01-dlang.
    DATA: line_size     TYPE i VALUE 255.
    DATA: v_name        LIKE soextreci1-receiver.
    DATA rec_tab        LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    Get the spool data.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
         EXPORTING
              rqident              = p_spool
              first_line           = 1
              last_line            = 0
              desired_type         = '   '
         IMPORTING
              real_type            = real_type
              sp_lang              = sp_lang
         TABLES
              buffer               = so_ali
         EXCEPTIONS
              no_such_job          = 1
              job_contains_no_data = 2
              selection_empty      = 3
              no_permission        = 4
              can_not_access       = 5
              read_error           = 6
              type_no_match        = 7
              OTHERS               = 8.
    IF sy-subrc <> 0.
      MESSAGE s208(00) WITH 'Error'.
      LEAVE LIST-PROCESSING.
    ENDIF.
    Prepare the data.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 0.
    plist-body_num = 0.
    plist-doc_type = 'RAW'.
    plist-obj_descr = 'Test ALV'.
    APPEND plist.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 1.
    DESCRIBE TABLE so_ali LINES plist-body_num.
    plist-doc_type = real_type.
    Get the size.
    READ TABLE so_ali INDEX plist-body_num.
    plist-doc_size = ( plist-body_num - 1 ) * line_size
                     + STRLEN( so_ali ).
    APPEND plist.
    Move the receiver address.
    MOVE: p_email  TO rec_tab-receiver,
          'U'      TO rec_tab-rec_type.
    APPEND rec_tab.
    IF NOT sp_lang IS INITIAL.
      document_data-obj_langu = sp_lang.
    ELSE.
      document_data-obj_langu = sy-langu.
    ENDIF.
    v_name = sy-uname.
    Send the email.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
         EXPORTING
              document_data              = document_data
              sender_address             = v_name
              sender_address_type        = 'B'
         TABLES
              packing_list               = plist
              contents_bin               = so_ali
              receivers                  = rec_tab
         EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              OTHERS                     = 8.
    IF sy-subrc <> 0.
      MESSAGE e208(00) WITH 'Error'.
    ENDIF.
    COMMIT WORK.
    Send the email immediately.
    SUBMIT rsconn01
    WITH mode = 'INT'
    AND RETURN.
    Thanks,
    Naren

  • Convert Script output data to Text(.txt) file & send mail with attachment.

    Hi All,
    Requirement: I shulb be able to conver th Script output data to Text(.text) file & send a maill with attachment with this text file. Formant of text file should be like output of Print priview.
    Plese sugget with Function modules to cover as Text file.
    I am able to converting the Script output data to PDF and sending mail with attachment. So I don't want PDF file now.
    Thanks in advance.

    Hi, Thanks for responst.
    We can convert the Scirpt output to PDF file by using OTF function module and the PDF file looks like Print Privew output.
    Same like this I want Script out in NOTEPAD (.txt). Is that possible, Plz sugget with relavent Function Modules.
    Thanks.

  • Problem in sending  mail with attachment

    Hi All,
    I am using the function module <b>'SO_NEW_DOCUMENT_ATT_SEND_API1'</b> to send mail with attachment.
    the program executes properly and shows a message <b>'Document Sent'</b>. But neither the sent mail appears in <b>'SOST'</b> nor I get it on the specified email id.
    Below is my code:
    <b>***</b> As attachment I am sending resume whose contents are stored in table 'ZResume' corresponding to personnel no.(pernr) and serial No.(srno).
    <b>START OF PROGRAM</b>----
    REPORT  ZPTEST_SEND_MAIL_ATTATCHMENT.
    DATA : w_name TYPE sos04-l_adr_name.
    DATA: RESUME TYPE table of XSTRING with header line.
    START-OF-SELECTION.
    <b>* Data Declaration</b>
      DATA:
        l_datum(10),
        ls_docdata    TYPE sodocchgi1,
        lt_objpack    TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
        lt_objhead    TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_objtxt     TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_objbin     TYPE TABLE OF solisti1   WITH HEADER LINE,
        lt_reclist    TYPE TABLE OF somlreci1  WITH HEADER LINE,
        lt_listobject TYPE TABLE OF abaplist   WITH HEADER LINE,
        l_tab_lines TYPE i,
        l_att_type  LIKE soodk-objtp.
      WRITE sy-datum TO l_datum.
      SELECT SINGLE RESUME FROM ZRESUME INTO RESUME
          WHERE PERNR EQ '00001182'
          AND SRNO EQ '1'.
    APPEND RESUME.
    <b>* Because RESUME may be  of size RAW(1000)
    and objbin is of size CHAR(255) we make this table copy</b>
    CALL FUNCTION 'TABLE_COMPRESS'
        TABLES
          in             = resume
          out            = lt_objbin
        EXCEPTIONS
          compress_error = 1
          OTHERS         = 2.
      IF sy-subrc <> 0.
      Error in function module &1
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
           WITH 'TABLE_COMPRESS'.
      ENDIF.
    <b>* Create the message and send the document.
    Create Message Body</b>
    <b>* Title and Description</b>
      ls_docdata-obj_name = 'Resume'.
      ls_docdata-obj_descr = 'Resume'.
    <b>* Main Text</b>
      lt_objtxt = 'Resume of the candidate' .
      APPEND lt_objtxt.
    <b>* Write Packing List (Main)</b>
      DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
      READ TABLE lt_objtxt INDEX l_tab_lines.
      ls_docdata-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
      CLEAR lt_objpack-transf_bin.
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = l_tab_lines.
      lt_objpack-doc_type = 'RAW'.
      APPEND lt_objpack.
    <b>* Create Message Attachment
    Write Packing List (Attachment)</b>
      l_att_type = 'ALI'.
      DESCRIBE TABLE lt_objbin LINES l_tab_lines.
      READ TABLE lt_objbin INDEX l_tab_lines.
      lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objbin ).
      lt_objpack-transf_bin = 'X'.
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = l_tab_lines.
      lt_objpack-doc_type = l_att_type.
      lt_objpack-obj_name = 'ATTACHMENT'.
      lt_objpack-obj_descr = 'Resume'.                  
      APPEND lt_objpack.
    <b>* Create receiver list</b>
        lt_reclist-receiver = '[email protected]'.
        lt_reclist-rec_type = 'U'.
        APPEND lt_reclist.
    <b>* Send Message</b>
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = ls_docdata
          put_in_outbox              = ''
        TABLES
          packing_list               = lt_objpack
          object_header              = lt_objhead
          contents_bin               = lt_objbin
          contents_txt               = lt_objtxt
          receivers                  = lt_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc = 0.
      Document sent
        MESSAGE ID 'SO' TYPE 'S' NUMBER '022'.
      ELSE.
      Document <&> could not be sent
        MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
           WITH ls_docdata-obj_name.
      ENDIF.
    <b>END OF PROGRAM</b>----
    Can anybody tell me where I am making mistake?
    Thanks in advance,
    Pragya

    Hi Pragya,
    Refer the code below. It's working fine and try to match up the things from your program.
    REPORT ZSAMPL_001 .
    INCLUDE ZINCLUDE_01.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    *file_open_error = 1
    *file_read_error = 2
    *no_batch = 3
    *gui_refuse_filetransfer = 4
    *invalid_type = 5
    *no_authority = 6
    *unknown_error = 7
    *bad_data_format = 8
    *header_not_allowed = 9
    *separator_not_allowed = 10
    *header_too_long = 11
    *unknown_dp_error = 12
    *access_denied = 13
    *dp_out_of_memory = 14
    *disk_full = 15
    *dp_timeout = 16
    *OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    ***INCLUDE ZINCLUDE_01 .
    10.08.2005 Amit M - Created
    Include For Mail (First Req F16)
    Modification Log
    Data
    tables crmrfcpar.
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    data v_rfcdest LIKE crmrfcpar-rfcdest.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8
    IF sy-subrc <> 0.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    FORM
    FORM ml_saveforbp USING jobname jobcount.
    Data
    *data : yhead like yhrt_bp_head.
    *DATA : ydocdata LIKE yhrt_bp_docdata,
    *yobjtxt LIKE yhrt_bp_objtxt OCCURS 0 WITH HEADER LINE,
    *yreclist LIKE yhrt_bp_reclist OCCURS 0 WITH HEADER LINE.
    *DATA : seqnr TYPE i.
    Head
    *yhead-jobname = jobname.
    *yhead-jobcount = jobcount..
    *MODIFY yhrt_bp_head FROM yhead.
    Doc Data
    *ydocdata-jobname = jobname.
    *ydocdata-jobcount = jobcount.
    *MOVE-CORRESPONDING docdata TO ydocdata.
    *MODIFY yhrt_bp_docdata FROM ydocdata.
    Objtxt
    *seqnr = 0.
    *LOOP AT objtxt.
    *seqnr = seqnr + 1.
    *yobjtxt-jobname = jobname.
    *yobjtxt-jobcount = jobcount.
    *yobjtxt-seqnr = seqnr.
    *MOVE-CORRESPONDING objtxt TO yobjtxt.
    *MODIFY yhrt_bp_objtxt FROM yobjtxt.
    *ENDLOOP.
    RecList
    *seqnr = 0.
    *LOOP AT reclist.
    *seqnr = seqnr + 1.
    *yreclist-jobname = jobname.
    *yreclist-jobcount = jobcount.
    *yreclist-seqnr = seqnr.
    *MOVE-CORRESPONDING reclist TO yreclist.
    *MODIFY yhrt_bp_reclist FROM yreclist.
    *ENDLOOP.
    ENDFORM. "ml_saveforbp
    FORM
    FORM ml_fetchfrombp USING jobname jobcount.
    *CLEAR docdata.
    *REFRESH objtxt.
    *REFRESH reclist.
    *SELECT SINGLE * FROM yhrt_bp_docdata
    *INTO corresponding fields of docdata
    *WHERE jobname = jobname
    *AND jobcount = jobcount.
    *SELECT * FROM yhrt_bp_objtxt
    *INTO corresponding fields of TABLE objtxt
    *WHERE jobname = jobname
    *AND jobcount = jobcount
    *ORDER BY seqnr.
    *SELECT * FROM yhrt_bp_reclist
    *INTO corresponding fields of TABLE reclist
    *WHERE jobname = jobname
    *AND jobcount = jobcount
    *ORDER BY seqnr.
    ENDFORM. "ml_fetchfrombp
    <b>Please reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Send mail with attachment from the uploaded file

    hi,
    From a form thread i got the following code to send mail with attachment with the file uploaded from the file upload ui element.
    public void onActionLoadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionLoadFile(ServerEvent)
         WDWebResourceType FileType = null;
         String FileName = new String();
              //get attribute info for context attribute 'FileUpload'
              IWDAttributeInfo attributeInfo =
                   wdContext.getNodeInfo().getAttribute(
                        IPrivateEmailView.IContextElement.FILE_UPLOAD);
              //get modifiable binary type from the attribute info,requires type cast.
              IWDModifiableBinaryType binaryType =
                   (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();
              IPrivateEmailView.IContextElement element =
                   wdContext.currentContextElement();
              //if a file in the 'FileResource' attribute exists
              if (element.getFileUpload() != null) {
                   try {
                        String mimeType = binaryType.getMimeType().toString();
                        byte[] file = element.getFileUpload();
                        //get the size of the uploaded file
                        element.setFileSize(this.getFileSize(file));
                        //get the extension of the uploaded file
                        element.setFileExtension(binaryType.getMimeType().getFileExtension());
                        //NOTE: context attribute 'FileName' must not be set
                        //because the FileUpload-UI-element property 'fileName'
                        //is bound to it. Consequently the fileName is automatically
                        //written to the context after file upload.
                        //report success message
                        wdComponentAPI.getMessageManager().reportMessage(
                        IMessageEmailComp.SF_UPLOAD,
                             new Object[] { binaryType.getFileName()},
                             false);
                        FileType = binaryType.getMimeType();
                        FileName = binaryType.getFileName();
                   } catch (Exception e) {
                        throw new WDRuntimeException(e);
              //if no file in the 'FileResource' attribute exists
              else {
                   //report error message
                   IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                   msgMgr.reportContextAttributeMessage(
                        element,
                        attributeInfo,
                        IMessageEmailComp.NO_FILE,
                        new Object[] { "" },
                        true);
              //clear the FileResource context value attribute
              //element.setFileUpload(null);
              String URL;
              URL = this.CreateAndGetPathFileUpload(
                                  wdContext.currentContextElement().getFileUpload(),
                                                      FileName);
    //          if (URL.length() == 1){
    //               //ERRORE
         wdContext.currentContextElement().setPATHFileUploaded(URL);
        //@@end
      public boolean send( java.lang.String subj, java.lang.String mess, java.lang.String dest, java.lang.String attach, java.lang.String FileName )
        //@@begin send()
         InitialContext ctx = null;
         Address[] address = null;
         Message msg = null;
         Session sess = null;
         MimeBodyPart bodyPart = null;
         Multipart mp = null;
         // "141.29.193.71" == milvl2ja.icn.siemens.it (SMTP di Siemens)
           try {
              Properties props = new Properties();
              props.put("domain","true");
              ctx = new InitialContext(props);
              sess = (Session) ctx.lookup("java:comp/env/mail/MailSession");
              msg = new MimeMessage(sess);
              IWDClientUser utente = WDClientUser.getCurrentUser();
              String senderEmail = utente.getSAPUser().getEmail();
              InternetAddress addressFrom = new InternetAddress(senderEmail);
              msg.setFrom(addressFrom);     
              String EmailDEST = dest;
              InternetAddress addressTo = new InternetAddress(EmailDEST);
              msg.setRecipient(Message.RecipientType.TO, addressTo);
              msg.setSubject(subj);
    //          if ((mess != null) && (mess.length()>0)) {
    //                 msg.setContent(mess, "text/plain");
    //            } else {
    //                 msg.setContent("", "text/plain");
              //Gestione ATTACHMENT...
              String attachedFileName = new String(wdContext.currentContextElement().getFileName());
              boolean hasAttachment = (attachedFileName != null) && (attachedFileName.length() > 0);
              boolean isMultiPart = (mess != null) && (mess.length() > 1);
              //adding an attachment makes the message multipart
                 if (isMultiPart || hasAttachment) {
                    mp = new MimeMultipart();
                    // add text parts
                      if (mess != null) {
                         for (int i = 0; i < mess.length(); i++) {
                           bodyPart = new MimeBodyPart();
                           bodyPart.setContent(mess,"text/plain");
                           mp.addBodyPart(bodyPart);
                    //attach the file to the message if needed
                    if (hasAttachment) {     // avoid the case with no text parts
                         bodyPart = new MimeBodyPart();
                           bodyPart.setContent("Allegato incluso nel messaggio.","text/plain");
                           mp.addBodyPart(bodyPart);
                           // the part with the file
                           FileDataSource fds = new FileDataSource(attach);
                           MimeBodyPart attachmentBodyPart = new MimeBodyPart();
                        attachmentBodyPart.setDataHandler(new DataHandler(fds));
                        //URL URLattachedFileName = new URL(attach);
                        //attachmentBodyPart.setDataHandler(new DataHandler(URLattachedFileName));
                           attachmentBodyPart.setFileName(FileName);
                           mp.addBodyPart(attachmentBodyPart);
                    msg.setContent(mp);
                 } else {
                    if ((mess != null) && (mess.length() > 0)) {
                         msg.setContent(mess, "text/plain");
                    } else {
                         msg.setContent("", "text/plain");
              //fine ATTACHMENT 
              msg.setSentDate(new GregorianCalendar().getTime());
              msg.saveChanges();
              address = msg.getAllRecipients();
              Transport.send(msg, address);
           } catch (Exception e) {
                 e.printStackTrace();
                 return false;
           return true;
        //@@end
    When i used the same code in my application i am gett ing error in many places..
    1)FileDataSource fds = new FileDataSource(<b>attach</b>);
    attach cannot be resolved
    2)attachmentBodyPart.setFileName(<b>FileName</b>);
    fliename cannot be resolved
    3)byte[] file = element.getFileUpload();
    type mismatch cannot convert sting to byte[]
    4)element.setFileSize(this.getFileSize(file));
    method getFileSize() is undefined
    5)element.setFileExtension(binaryType.getMimeType().getFileExtension());
    method getFilExtension() is undefined
    6)URL = this.CreateAndGetPathFileUpload(wdContext.currentContextElement().getFileUpload(),FileName);
    method CreateAndGetPathFileUpload() is undefined.
    7)wdContext.currentContextElement().setPATHFileUploaded(URL);
    from the above error i can understand that only i have got the part of the code.
    Please send me the complete coding.
    some method definitions are missing....
    Please help me to send the mail with attachment from the file uploaded from the file upload ui element.
    Thanks in advance,
    shami.

    hi,
    I got this from the following link
    Re: Attaching an excel file
    plz help me ...
    I am using 2004s with nwds 7.0.06.
    also tell me what should be the type of the context variable FileUpload
    Thanks in advance,
    shami.

  • Send mail with attachment and more recipients

    Hi to all,
    I have this procedure :
    PROCEDURE SPEDISCI_MAIL
    Mittente IN VARCHAR2,
    Destinatario IN VARCHAR2,
    Oggetto IN VARCHAR2,
    Messaggio IN VARCHAR2
    IS
    mailhost VARCHAR2(40) := 'pippo.com';
    conn utl_smtp.connection;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    mesg VARCHAR2( 1000 );
    local_mittente VARCHAR2(2000) := mittente;
    BEGIN
    conn := utl_smtp.open_connection (mailhost,25);
    mesg:='Date:'||TO_CHAR(SYSDATE,'dd mon yy hh24:mi:ss')||crlf||
    'From:<'||mittente||'>'||crlf||
    'Subject:'||Oggetto||crlf||
    'To:'||destinatario||crlf||''
    ||crlf||messaggio;
    utl_smtp.helo(conn, mailhost);
    utl_smtp.mail(conn,local_mittente);
    utl_smtp.rcpt(conn,destinatario);
    utl_smtp.data(conn, mesg);
    utl_smtp.quit(conn);
    END;
    Can I send mail with attachment and more recipients?
    Thank you
    Silvia

    Consider using UTL_MAIL package:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm
    (Note: it's not installed and configured by default, but the scripts are supplied with the Oracle database, see documentation for instructions)

  • Send mail with attachment

    Hello all.
    I have a problem that i dont know how to resolve: I need to send an email to some adresses  with an attachment ( an excel file stored on the server's drive) How can it be done?
    The email has to be sent by a job that should do this operation each day.
    Thank you,
    Cristian.
    Message was edited by:
            Cristian Boartes

    see this
    Sending mail with attachment
    This program will allowed you to send email with attachment.
    First, specify the attachment file from your local hardisk and execute.
    Next, specify the sender email address and click the send button.
    report y_cr17_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara  like selc occurs 0 with header line.
    data g_objparb  like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
      text(4096) type c,
       end of g_files.
    data : fold_number(12) type c,
           fold_yr(2) type c,
           fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
       user                            = g_user
       PREPARE_FOR_FOLDER_ACCESS       = ' '
    importing
       user_data                       = g_user_data
    EXCEPTIONS
       USER_NOT_EXIST                  = 1
       PARAMETER_ERROR                 = 2
       X_ERROR                         = 3
       OTHERS                          = 4
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number =  g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
      g_objhead,
      g_objpara,
      g_objparb,
      g_receipients,
      g_attachments,
      g_references,
      g_files.
    method1 = 'SAVE'.
    g_document-foltp  = fold_type.
    g_document-folyr   = fold_yr.
    g_document-folno   = fold_number.
    g_document-objtp   = g_user_data-object_typ.
    *g_document-OBJYR   = '27'.
    *g_document-OBJNO   = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes   = 'sap-img.com testing by program'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = sy-uname
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
      FOLMEM_DATA        =
      RECEIVE_DATA       =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append  g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header.
    *-- End of Program
    <b>also try this one for background scheduling the same</b>
    Sending mail with attachment report in Background
    Pay attention because it’s working with output list from spool converted to pdf.
    =================================================================================
    z_send_email_fax_global
    FUNCTION-POOL z_gfaian_mail_fax.            “MESSAGE-ID ..
    WORK TABLE AREAS
    TABLES: tsp01.
    INTERNAL TABLES
    DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
    lt_note_text   LIKE STANDARD TABLE OF soli  WITH HEADER LINE,
    lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
    DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
    lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
    DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
    TYPES: BEGIN OF y_files,
    file(60) TYPE c,
    END OF y_files.
    DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
    DATA: l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE.
    DATA: l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE.
    STRUCTURES
    DATA: folder_id      LIKE soodk,
    object_id      LIKE soodk,
    link_folder_id LIKE soodk,
    g_document     LIKE sood4,
         g_header_data  LIKE sood2,
    g_folmem_data  LIKE sofm2,
    g_header_data  LIKE sood2,
    g_receive_data LIKE soos6,
    g_ref_document LIKE sood4,
    g_new_parent   LIKE soodk,
    l_folder_id    LIKE sofdk,
    v_email(50).
    DATA: hd_dat  like sood1.
    VARIABLES
    DATA: client  LIKE tst01-dclient,
    name    LIKE tst01-dname,
    objtype LIKE rststype-type,
    type    LIKE rststype-type.
    DATA: numbytes TYPE i,
    arc_idx LIKE toa_dara,
    pdfspoolid LIKE tsp01-rqident,
    jobname LIKE tbtcjob-jobname,
    jobcount LIKE tbtcjob-jobcount,
    is_otf.
    DATA: outbox_flag LIKE sonv-flag VALUE ‘X’,
    store_flag  LIKE sonv-flag,
    delete_flag LIKE sonv-flag,
    owner       LIKE soud-usrnam,
    on          LIKE sonv-flag VALUE ‘X’,
    sent_to_all LIKE sonv-flag,
    g_authority LIKE sofa-usracc,
    w_objdes    LIKE sood4-objdes.
    DATA: c_file LIKE rlgrap-filename,
    n_spool(6) TYPE n.
    DATA: cancel.
    DATA: desired_type  LIKE sood-objtp,
    real_type LIKE sood-objtp,
    attach_type LIKE sood-objtp,
    otf LIKE sood-objtp VALUE ‘OTF’, ” SAPscript Ausgabeformat
    ali LIKE sood-objtp VALUE ‘ALI’. ” ABAP lists
    CONSTANTS
    CONSTANTS: ou_fol LIKE sofh-folrg              VALUE ‘O’,
    c_objtp    LIKE g_document-objtp    VALUE ‘RAW’,
    c_file_ext LIKE g_document-file_ext VALUE ‘TXT’.
    =================================================================================
    z_send_email_fax2
    FUNCTION z_faian_mail_fax2.
    ””Interface local:
    *”  IMPORTING
    *”     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *”     REFERENCE(FAX_MAIL_NUMBER) TYPE  SO_NAME
    *”     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *”     REFERENCE(OBJECT_TYPE) TYPE  SO_ESCAPE
    *”  TABLES
    *”      LT_BODY_EMAIL STRUCTURE  SOLI
    *”  EXCEPTIONS
    *”      ERR_NO_ABAP_SPOOLJOB
    Fist part: Verify if the spool really exists
    SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
    IF sy-subrc NE 0.
    RAISE err_no_abap_spooljob. “doesn’t exist
    ELSE.
    client = tsp01-rqclient.
    name   = tsp01-rqo1name.
    CALL FUNCTION ‘RSTS_GET_ATTRIBUTES’
    EXPORTING
    authority     = ‘SP01&#8242;
    client        = client
    name          = name
    part          = 1
    IMPORTING
    type          = type
    objtype       = objtype
    EXCEPTIONS
    fb_error      = 1
    fb_rsts_other = 2
    no_object     = 3
    no_permission = 4
    OTHERS        = 5.
    IF objtype(3) = ‘OTF’.
    desired_type = otf.
    ELSE.
    desired_type = ali.
    ENDIF.
    CALL FUNCTION ‘RSPO_RETURN_SPOOLJOB’
    EXPORTING
    rqident              = src_spoolid
    desired_type         = desired_type
    IMPORTING
    real_type            = real_type
    TABLES
    buffer               = l_objcont
    EXCEPTIONS
    no_such_job          = 14
    type_no_match        = 94
    job_contains_no_data = 54
    no_permission        = 21
    can_not_access       = 21
    read_error           = 54.
    IF sy-subrc EQ 0.
    attach_type = real_type.
    ENDIF.
    CALL FUNCTION ‘SO_FOLDER_ROOT_ID_GET’
    EXPORTING
    owner     = sy-uname
    region    = ou_fol
    IMPORTING
    folder_id = l_folder_id
    EXCEPTIONS
    OTHERS    = 5.
    fill out informations about the header of the email
    CLEAR: g_document.
    g_document-foltp     = l_folder_id-foltp.
    g_document-folyr     = l_folder_id-folyr.
    g_document-folno     = l_folder_id-folno.
    g_document-objtp     = c_objtp.
    g_document-objdes    = header_mail.
    g_document-file_ext  = c_file_ext.
    g_header_data-objdes    = header_mail.
    CALL FUNCTION ‘SO_DOCUMENT_REPOSITORY_MANAGER’
    EXPORTING
    method      = ‘SAVE’
    office_user = sy-uname
    IMPORTING
    authority   = g_authority
    TABLES
    objcont     = lt_body_email
    attachments = lt_attachments
    CHANGING
    document    = g_document
    header_data = g_header_data
    EXCEPTIONS
    OTHERS      = 1.
    folder_id-objtp = l_folder_id-foltp.
    folder_id-objyr = l_folder_id-folyr.
    folder_id-objno = l_folder_id-folno.
    object_id-objtp = c_objtp.
    object_id-objyr = g_document-objyr.
    object_id-objno = g_document-objno.
    link_folder_id-objtp = l_folder_id-foltp.
    link_folder_id-objyr = l_folder_id-folyr.
    link_folder_id-objno = l_folder_id-folno.
    REFRESH lt_rec_tab.
       CLEAR lt_rec_tab.
       lt_rec_tab-sel        = ‘X’.
       lt_rec_tab-recesc     = object_type.   “This field for FAX/MAIL
       lt_rec_tab-recnam     = ‘U-’.
       lt_rec_tab-deliver    = ‘X’.
       lt_rec_tab-not_deli   = ‘X’.
       lt_rec_tab-read       = ‘X’.
       lt_rec_tab-mailstatus = ‘E’.
       lt_rec_tab-adr_name   = fax_mail_number.
       lt_rec_tab-sortfield  = fax_mail_number.
       lt_rec_tab-recextnam  = fax_mail_number.
       lt_rec_tab-sortclass  = ‘5&#8242;.
       APPEND lt_rec_tab.
    lt_rec_tab-recextnam = fax_mail_number.
    lt_rec_tab-recesc = object_type.
    lt_rec_tab-sndart = ‘INT’.
    lt_rec_tab-sndpri = 1.
    APPEND lt_rec_tab.
    lt_files-file = c_file.
    APPEND lt_files.
    begin of insertion by faianf01
    hd_dat-objdes = header_mail.
    CALL FUNCTION ‘SO_ATTACHMENT_INSERT’
    EXPORTING
    object_id                  = object_id
    attach_type                = attach_type
    object_hd_change           = hd_dat
    owner                      = sy-uname
    TABLES
    objcont                    = l_objcont
    objhead                    = l_objhead
    EXCEPTIONS
    active_user_not_exist      = 35
    communication_failure      = 71
    object_type_not_exist      = 17
    operation_no_authorization = 21
    owner_not_exist            = 22
    parameter_error            = 23
    substitute_not_active      = 31
    substitute_not_defined     = 32
    system_failure             = 72
    x_error                    = 1000.
    IF sy-subrc > 0.
    ENDIF.
    end of insertion by faianf01
    send email from SAPOFFICE
    CALL FUNCTION ‘SO_OBJECT_SEND’
    EXPORTING
    folder_id                  = folder_id
    object_id                  = object_id
    outbox_flag                = outbox_flag
    link_folder_id             = link_folder_id
    owner                      = sy-uname
                 check_send_authority       = ‘X’
    TABLES
    receivers                  = lt_rec_tab
                 note_text                  = lt_note_text
    EXCEPTIONS
    active_user_not_exist      = 35
    communication_failure      = 71
    component_not_available    = 1
    folder_no_authorization    = 5
    folder_not_exist           = 6
    forwarder_not_exist        = 8
    object_no_authorization    = 13
    object_not_exist           = 14
    object_not_sent            = 15
    operation_no_authorization = 21
    owner_not_exist            = 22
    parameter_error            = 23
    substitute_not_active      = 31
    substitute_not_defined     = 32
    system_failure             = 72
    too_much_receivers         = 73
    user_not_exist             = 35.
    ENDIF.
    ENDFUNCTION.
    =================================================================================
    z_send_email_fax
    FUNCTION ZCBFS_SEND_MAIL.
    ””Interface local:
    *”  IMPORTING
    *”     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *”     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *”  TABLES
    *”      LIST_FAX_MAIL_NUMBER STRUCTURE  SOLI
    *”  EXCEPTIONS
    *”      ERR_NO_ABAP_SPOOLJOB
    DATA: vg_achou(1) TYPE n.
    Fist part: Verify if the spool really exists
    vg_achou = 1.
    DO 60 TIMES.
    SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
    IF sy-subrc IS INITIAL.
    CLEAR vg_achou.
    EXIT.
    ELSE.
    WAIT UP TO 1 SECONDS.
    ENDIF.
    ENDDO.
    IF vg_achou = 1.
    RAISE err_no_abap_spooljob. “doesn’t exist
    ENDIF.
    client = tsp01-rqclient.
    name   = tsp01-rqo1name.
    CALL FUNCTION ‘RSTS_GET_ATTRIBUTES’
    EXPORTING
    authority     = ‘SP01&#8242;
    client        = client
    name          = name
    part          = 1
    IMPORTING
    type          = type
    objtype       = objtype
    EXCEPTIONS
    fb_error      = 1
    fb_rsts_other = 2
    no_object     = 3
    no_permission = 4
    OTHERS        = 5.
    IF objtype(3) = ‘OTF’.
    desired_type = otf.
    ELSE.
    desired_type = ali.
    ENDIF.
    CALL FUNCTION ‘RSPO_RETURN_SPOOLJOB’
    EXPORTING
    rqident              = src_spoolid
    desired_type         = desired_type
    IMPORTING
    real_type            = real_type
    TABLES
    buffer               = l_objcont
    EXCEPTIONS
    no_such_job          = 14
    type_no_match        = 94
    job_contains_no_data = 54
    no_permission        = 21
    can_not_access       = 21
    read_error           = 54.
    IF sy-subrc EQ 0.
    attach_type = real_type.
    ENDIF.
    CALL FUNCTION ‘SO_FOLDER_ROOT_ID_GET’
    EXPORTING
    owner     = sy-uname
    region    = ou_fol
    IMPORTING
    folder_id = l_folder_id
    EXCEPTIONS
    OTHERS    = 5.
    fill out informations about the header of the email
    CLEAR: g_document.
    g_document-foltp     = l_folder_id-foltp.
    g_document-folyr     = l_folder_id-folyr.
    g_document-folno     = l_folder_id-folno.
    g_document-objtp     = c_objtp.
    g_document-objdes    = header_mail.
    g_document-file_ext  = c_file_ext.
    g_header_data-objdes    = header_mail.
    CALL FUNCTION ‘SO_DOCUMENT_REPOSITORY_MANAGER’
    EXPORTING
    method      = ‘SAVE’
    office_user = sy-uname
    IMPORTING
    authority   = g_authority
    TABLES
    attachments = lt_attachments
    CHANGING
    document    = g_document
    header_data = g_header_data
    EXCEPTIONS
    OTHERS      = 1.
    folder_id-objtp = l_folder_id-foltp.
    folder_id-objyr = l_folder_id-folyr.
    folder_id-objno = l_folder_id-folno.
    object_id-objtp = c_objtp.
    object_id-objyr = g_document-objyr.
    object_id-objno = g_document-objno.
    link_folder_id-objtp = l_folder_id-foltp.
    link_folder_id-objyr = l_folder_id-folyr.
    link_folder_id-objno = l_folder_id-folno.
    REFRESH lt_rec_tab.
    LOOP AT LIST_FAX_MAIL_NUMBER.
    lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
    lt_rec_tab-recesc = ‘U’.
    lt_rec_tab-sndart = ‘INT’.
    lt_rec_tab-sndpri = 1.
    APPEND lt_rec_tab.
    ENDLOOP.
    lt_files-file = c_file.
    APPEND lt_files.
    hd_dat-objdes = header_mail.
    CALL FUNCTION ‘SO_ATTACHMENT_INSERT’
    EXPORTING
    object_id                  = object_id
    attach_type                = attach_type
    object_hd_change           = hd_dat
    owner                      = sy-uname
    TABLES
    objcont                    = l_objcont
    objhead                    = l_objhead
    EXCEPTIONS
    active_user_not_exist      = 35
    communication_failure      = 71
    object_type_not_exist      = 17
    operation_no_authorization = 21
    owner_not_exist            = 22
    parameter_error            = 23
    substitute_not_active      = 31
    substitute_not_defined     = 32
    system_failure             = 72
    x_error                    = 1000.
    IF sy-subrc > 0.
    ENDIF.
    send email from SAPOFFICE
    CALL FUNCTION ‘SO_OBJECT_SEND’
    EXPORTING
    folder_id                  = folder_id
    object_id                  = object_id
    outbox_flag                = outbox_flag
    link_folder_id             = link_folder_id
    owner                      = sy-uname
    TABLES
    receivers                  = lt_rec_tab
    note_text                  = lt_note_text
    EXCEPTIONS
    active_user_not_exist      = 35
    communication_failure      = 71
    component_not_available    = 1
    folder_no_authorization    = 5
    folder_not_exist           = 6
    forwarder_not_exist        = 8
    object_no_authorization    = 13
    object_not_exist           = 14
    object_not_sent            = 15
    operation_no_authorization = 21
    owner_not_exist            = 22
    parameter_error            = 23
    substitute_not_active      = 31
    substitute_not_defined     = 32
    system_failure             = 72
    too_much_receivers         = 73
    user_not_exist             = 35.
    ENDFUNCTION.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Help regd in sending mails with attachment

    Hi All,
    I have a requirement to send mails with attachements.The attachments can be simple word , excel anything. Please help.Is there a way I can send these from workflows also?

    hi use this , this is one of the best examples for sending mail ....
    1. We can send files with attachment.
    However, There is some trick involved
    in the binary files.
    2. I have made a program (and it works fantastic)
    ONLY 6 LINES FOR EMAILING
    BELIEVE ME
    ITS A FANTASTIC PROGRAM.
    IT WILL WORK LIKE OUTLOOK EXPRESS !
    3. The user is provided with
    a) file name
    b) email address to send mail
    and it sends ANY FILE (.xls,.pdf .xyz..)
    Instantaneously !
    4. Make two things first :
    1. Include with the name : ZAMI_INCLFOR_MAIL
    2. Report with the name : ZAM_TEMP147 (any name will do)
    3. Activate both and execute (2)
    4. After providing filename, email adress
    5. Code for Include :
    10.08.2005 Amit M - Created
    Include For Mail (First Req F16)
    Modification Log
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8
    IF sy-subrc 0.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    CODE FOR PROGRAM
    5.
    REPORT zam_temp147 .
    INCLUDE zami_inclfor_mail.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    regards,
    venkat.

  • Sending Mail with attachment from WD

    Hi all,
    I wan't to send an email from webdynpro with an attached pdf-document. I had a look at Tutorial 31, but i will only use the first part, sending email with attached interactive form. So I decided to build a new project. I did everything as in the tutorial described, but when entering the following code into the wdDoInit method from the SendView an error occurs.
    //@@begin wdDoInit()
         //     @TODO Enter your email address for the setFrom and setTo methods by replacing the text in angle brackets.
         wdContext.currentEmailElement().setFrom("[email protected]");
         wdContext.currentEmailElement().setTo("[email protected]");
         wdContext.currentEmailElement().setCc("");
         wdContext.currentEmailElement().setBcc("");
         wdContext.currentEmailElement().setSubject("Travel Request Form");
         wdContext.currentEmailElement().setBody("BlaBlaBla");   
        //@@end
    In the coding is no error. In the Context node of the SendView I created a new value node with the value attributes. When writing the code and using strg+space i can complete automatically, so no writing errors.
    When deploying and running the application I get always a NullPointerException, if make no difference if i delete one entry or which line of code i insert, the same error.
    java.lang.NullPointerException
         at com.ao.test.emailtest.SendView.wdDoInit(SendView.java:99)
         at com.ao.test.emailtest.wdp.InternalSendView.wdDoInit(InternalSendView.java:127)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:274)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
    I've compared my project with the one from tutorial but i found no differences.
    Have anybody have an idea what to do?
    Thanks
    Mathias

    Hi,
    NullpOinter excepttion could be bcose of "currentEmailElement()".
    Please create an element of EmailNode before these statements.
    IPrivate<ViewName>.IEmailElement ele=wdContext.createEmailElement();
    wdContext.NodeEmail().addElement(ele);
    You can use the following for sending attachments :
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setText(Attachment);
    Multipart multipart = new MimeMultipart();
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(Attachment);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(Attachment);
    multipart.addBodyPart(messageBodyPart);
    msg.setContent(multipart);
    Regards, Anilkumar
    Message was edited by: Anilkumar Vippagunta

  • Send mail with attachement

    i want to send mail with attachements. does wwv_flow_mail.send support this feature? how to do it?
    thanks,

    Please check this thread..
    Re: sending mails with attachment
    Hope this helps.
    Thanks

  • Send mail with attachment from webdynpro application

    hi,
    From a webdynpro application, the user will upload any files through the File upload ui element.These uploaded files has to go as an attachment in the mail which is being send to a particular ID ,when the user clicks the submit button in the form.
    can you please give me the code regarding this and help me in sending mail with attachment from a webdynpro application.
    Thanks in advance,
    shami.

    Hai,
    Properties props = System.getProperties();
           props.put("mail.smtp.host", "xx.xx.x.xx");
           Session session = Session.getDefaultInstance(props, null);
           Message msg = new MimeMessage(session);
           msg.setFrom(new InternetAddress("[email protected]"));
           msg.setRecipients(Message.RecipientType.TO,
           InternetAddress.parse("[email protected]", false));
           msg.setSubject(subject);
           msg.setText(body);
           msg.setHeader("X-Mailer", " Email");
           msg.setSentDate(new Date());
           MimeBodyPart messageBodyPart = new MimeBodyPart();
           messageBodyPart.setText("Hai , This mail Generated By the  Program");
          Multipart multipart = new MimeMultipart();
           multipart.addBodyPart(messageBodyPart);
            messageBodyPart = new MimeBodyPart();
            DataSource source = new FileDataSource("C:\nag.xls");//Here you need to give the Path of uploaded File
            messageBodyPart.setDataHandler( new DataHandler(source));
            messageBodyPart.setFileName("nag.xls");
            multipart.addBodyPart(messageBodyPart);
            // Put parts in message
            msg.setContent(multipart);
           Transport.send(msg);
    Regards,
    Naga

  • Sending mails without using sendmail service. Is that possible?

    Hi all,
    I am considerably new to Solaris.
    I have a query,
    Is it possible to send mails out without using sendmail service?
    If so how can they be implemented in,
    Solaris 7?
    Solaris 8?
    Solaris 9?
    If it is not possible, are there any workarounds to achieve this or else this cannot be implemented at all?
    It would be really great if someone could shed light on this query.

    Your question is a little ambiguous. However, I will try to answer it.
    You need to use a program to send the email for you. On Solaris by default this is sendmail. However, it can be used in a number of modes.
    1. It can be run as a daemon, listening on port 25 for new messages to be delivered to it.
    This is enabled by default but is not necessary for sending email. If you wish to switch sendmail off as a service in Solaris10 then you should type 'svcadm disable svc:/network/smtp:sendmail'. If you wish to switch it off on earlier Solaris releases you will need to move/erase the startup script in either /etc/rc2.d or /etc/rc3.d.
    2. It can be run in 'immediate mode' to send mail immediately.
    This allows you to send a mail directly to someone. On a normally configured sendmail instance it will try to deliver the mail immediately - if the server at the other end is unavailable, the mail will be queued locally to be potentially delivered at a later date.
    3. It can run in delivery only mode to attempt to send queued mail
    Queued mail will not automatically get processed. Sendmail needs to run at a later date to attempt to deliver any queued mail. This can either be done via cron using 'sendmail -q' or sendmail can be left running the whole time and told to rerun the queue in given periods ie 'sendmail -q15m'
    There are alternatives to sendmail for delivering mail - postfix, exim, qmail are just three examples. I would advise against trying to deliver mail without using a specific mail agent to do it. Whilst the SMTP mail protocol is pretty simple in basic use cases the protocol does get complex. There is no real downside in using an established program.
    HTH.

Maybe you are looking for

  • Error Entry does not exist in J_1BNFITMRULE (check entry) Nfe 10 Incomig

    Bom dia pessoal. Ao tentar executar um dos passos no cenário de compras normais, (Assign Purchase Order), o seguinte erro ocorreu Entry does not exist in J_1BNFITMRULE (check entry). Detalhe: Para o mesmo pedido ja havia sido efetuada 3 entradas via

  • How to prepare  for interview

    hi everyone, Just know completed my sap sd course. i would like to know how prepare my self for interview..... i do have Configuration  skills in u2022     Sales Process: Expert in Quotation, Sales Order, Delivery, and Billing. u2022     Special Busi

  • 6630 PC SUITE INSTALLATION PROBLEM

    Windows XP PROFESSIONAL edition, Version 2002, service pack 1 When downloading PC suit I get the following error message:- Error 1402.COULD NOT OPEN KEY: HKEY_LOCAL_MACHINE\software\classes\Msxml2.Domdocument.4.0\CLSID I tried several times to instal

  • Handling view In MM01

    If we change material type while up loading with  MM01 So I want to know how we handle that views while uploading plz tell me points will be rewarded

  • Data flow in RSA1 is missing

    Hi All, I am currently working on BI7. In RSA1,Unfortunately I can able to see only Info Package.Under that,I cannot able to see data flow in RSA1 This is happening only in my Login.Please help on this. Thanks, Siva.