Mail receiver with attachment

Hey,
I have a rfc to mail scenario, it works but i get the payload(data) as an attachment, how do i change it so payload will be in mail body ?
TX

Hey Abhishek,
what do you meen by "HTML formatting", can you please explain how to do that ?
how can i use both mail package and XSLT ? isnt it one or the other ?
this is my xslt:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<rfc:Y_SD_XI_FEED_BACK_1 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
   <xsl:element name = "COUNTER_E" >
      <xsl:value-of select = "//COUNTER_E" />
   </xsl:element>
   <xsl:element name = "DATUM" >
      <xsl:value-of select = "//DATUM" />
   </xsl:element>
   <xsl:element name = "DELIVERY" >
      <xsl:value-of select = "//DELIVERY" />
   </xsl:element>
   <xsl:element name = "FILE_NAME" >
      <xsl:value-of select = "//FILE_NAME" />
   </xsl:element>
   <xsl:element name = "FUNCNAME" >
      <xsl:value-of select = "//FUNCNAME" />
   </xsl:element>
   <xsl:element name = "INV_DOC_NO" >
      <xsl:value-of select = "//INV_DOC_NO" />
   </xsl:element>
   <xsl:element name = "MANDT" >
      <xsl:value-of select = "//MANDT" />
   </xsl:element>
   <xsl:element name = "PO_NUMBER" >
      <xsl:value-of select = "//PO_NUMBER" />
   </xsl:element>
   <xsl:element name = "SYSID" >
      <xsl:value-of select = "//SYSID" />
   </xsl:element>
   <xsl:element name = "TEXT" >
      <xsl:value-of select = "//TEXT" />
   </xsl:element>
   <xsl:element name = "SYSID" >
      <xsl:value-of select = "//SYSID" />
   </xsl:element>
   <xsl:element name = "UZEIT" >
      <xsl:value-of select = "//UZEIT"/>
   </xsl:element>     
   <IT_RETURN>
   <xsl:for-each select = "//IT_RETURN/item" >
   <item>
      <xsl:element name = "TYPE" >
      <xsl:value-of select = "//TYPE" />
   </xsl:element>
   <xsl:element name = "ID" >
      <xsl:value-of select = "//ID" />
   </xsl:element>
   <xsl:element name = "NUMBER" >
      <xsl:value-of select = "//NUMBER" />
   </xsl:element>
   <xsl:element name = "MESSAGE" >
      <xsl:value-of select = "//MESSAGE"/>
   </xsl:element>  
      <xsl:element name = "LOG_NO" >
      <xsl:value-of select = "//LOG_NO" />
   </xsl:element>
   <xsl:element name = "LOG_MSG_NO" >
      <xsl:value-of select = "//LOG_MSG_NO" />
   </xsl:element>
   <xsl:element name = "MESSAGE_V1" >
      <xsl:value-of select = "//MESSAGE_V1"/>
   </xsl:element>
      <xsl:element name = "MESSAGE_V2" >
      <xsl:value-of select = "//MESSAGE_V2"/>
   </xsl:element>
      <xsl:element name = "MESSAGE_V3" >
      <xsl:value-of select = "//MESSAGE_V3"/>
   </xsl:element>
      <xsl:element name = "MESSAGE_V4" >
      <xsl:value-of select = "//MESSAGE_V4"/>
   </xsl:element>
      <xsl:element name = "PARAMETER" >
      <xsl:value-of select = "//PARAMETER"/>
   </xsl:element>
      <xsl:element name = "ROW" >
      <xsl:value-of select = "//ROW"/>
   </xsl:element>
      <xsl:element name = "FIELD" >
      <xsl:value-of select = "//FIELD"/>
   </xsl:element>
      <xsl:element name = "SYSTEM" >
      <xsl:value-of select = "//SYSTEM"/>
   </xsl:element>   
   </item>
</xsl:for-each>
</IT_RETURN>
</rfc:Y_SD_XI_FEED_BACK_1>
</xsl:template>
</xsl:stylesheet>
Edited by: Zevik Heinoch on Feb 9, 2009 3:07 PM

Similar Messages

  • File-xi- mail scenario with attachements

    Hi
    Can anybody tell me the real time use of file-xi- mail scenario with attachements ??
    thanks
    kumar

    Hi,
    >>>>Can anybody tell me the real time use of file-xi- mail scenario with attachements ??
    yes: your application puts order data into a file and generated a PDF file with it
    XI takes both and send order file in mail and PDF in mail attachment
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Receiver Mail Adapter with Attachment and Mailpackage

    I have set up a scenario
    filesystem: filexxx.xml filexxx.pdf
    xml= mailpackage format to get the receiver mailaddress
    pdf=the file i want to send as a attchment.
    I am using the RenemAttachment module i found on SDN.
    in SXMB_MONI it looks ok,  the attachment name is filexxx.pdf application/pdf
    But when i look at the mail send it shows as attachments
    Untitled.txt and Untitled.pdf
    Any id's
    I only want to send the mail woth one attachment, the original pdf as a attchment.
    tnx

    Issue should be solved with SP17.
    I solved by putting the attacgement into the content part of the message.
    like.
    <?xml version="1.0" encoding="ISO8859-1"?>
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
         <Subject>Greenery:TESTTEST</Subject>
         <From>customerservicedesk@xxxxxxx</From>
         <To>Peter.schults@xx</To>
         <Content_Type>application/pdf; name=TEST.pdf</Content_Type>
         <Content_Description>PDF FAKTUUR</Content_Description>
         <Content_Disposition>attachment; filename=TEST.pdf</Content_Disposition>
        </ns1:Mail>

  • Xi sender mail adapter with attachment (to Web Service w/ attachment)

    Hello,
    We're working on an XI scenario wherein a sender mail adapter polls an exchange server inbox for mail (with attachment)and sends the attachment to a Web Service via SOAP Adapter? Does anyone know if this is doable, and if so, how?
    Thanks,
    Eric

    Hi!
    I think so, if you just have a single attachment to be transferred.
    Use the Mail Sender Adapter and specify the MailServer URL etc...
    In the Module provessor of the Mail-Adapter you have to specify the PayloadSwapBean ( -> this changes the payload - the attachment becomes the payload)
    then you configure the standard XI-scenario with
    SenderAgreement
    Mapping if necessary
    Receiver Agreement
    Receiver adapter
    kr Martin

  • Mail receiver adapter: attachment adds 3 empy lines

    Hi,
    i use the mail receiver adapter with "mail package" for setting dynamic attachment names.
    The attachment always gets 3 "cr/lf" lines at the end? Why and how can i stop that?
    System: xi3.0sp15build0
    Message was edited by:
            Bernhard Josef Neuhauser

    HI,
    Please read above link for PayloadSwapBean.
    You use the PayloadSwapBean module to replace the application payload of the XI message that contains the business data with another payload that is appended to the XI message as an attachment
    Also see the links below.. how to use PayloadSwapBean.
    HOW - PayloadSwapBean - adding attachments to the message? :-)
    Mailadapter, receive mails from mailserver: attachment?
    Work with attachments
    Sender Mail Adapter - html body mail
    Multi Attachments with ZIP or Mail Adapter (Outbound)
    Regards
    Chilla..

  • How to include body of the mail along with attachment using the below FM

    Hi All,
    I am using the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to generate an e-mail with excel file as attachment. Can you please  let me know how to include body of the e-mail along with this attachment.
    Thanks & Regards
    Gowthami

    hi,
    see this code
    TABLES: apqi.                         "Queue info definition
    TYPES DECLARATION
    *& Global Types
    TYPE-POOLS: slis,                     "Type for alv list
                sx.                       "SAP connect
    TYPE-POOLS: list.
    *& Types
    TYPES: BEGIN OF s_itab_apqi.
            INCLUDE STRUCTURE apqi.
    TYPES: END OF s_itab_apqi.
               INTERNAL TABLE / WORK AREA DECLARATION             *
    *&  For email  attachment
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE  0
                    WITH HEADER LINE.
    DATA:   it_packing_list  LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            it_contents      LIKE solisti1 OCCURS 0 WITH HEADER LINE  ,
            it_receivers     LIKE somlreci1 OCCURS 0 WITH HEADER LINE ,
            it_attachment    LIKE solisti1 OCCURS 0 WITH HEADER LINE  ,
            it_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE  .
    DATA:   v_cnt            TYPE i                                   ,
            v_sent_all(1)    TYPE c                                   ,
            v_doc_data       LIKE sodocchgi1                          ,
            gd_error         TYPE sy-subrc                            ,
            gd_reciever      TYPE sy-subrc                            .
    DATA: p_email   TYPE somlreci1-receiver
                                 VALUE 'mail id here of the reciever'.
    *&   Variable for attachment name
    DATA: v_attach(12).
    *&   Internal table to get data from apqi table
    table here
    DATA: ws_line TYPE slis_listheader.
    DATA: it_list_top_of_page TYPE slis_t_listheader.
    CONSTANTS : v_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
    VARIABLE DECLARATION
    DATA: v_colpos        TYPE i.
    DATA: v_transcnt(10)  TYPE c,
          v_transcnte(10) TYPE c,
          v_transcntf(10) TYPE c,
          v_msgcnt(10)    TYPE c,
          v_qid(20)       TYPE c.
    DATA  v_tot_rec(3)    TYPE n.
    DATA :v_date(10) TYPE c,
          v_time(8) TYPE c .
    DATA: v_fromdate(10) .
    DATA: v_todate(10) .
    SELCTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-015.
    PARAMETERS:
    SELECTION-SCREEN END OF BLOCK blk1.
    AT SELCTION SCREEN
    AT SELECTION-SCREEN.
      IF p_dfrom IS INITIAL AND
         NOT p_dato IS INITIAL.
        MESSAGE e000(zp) WITH text-020.
      ENDIF.
    START OF SELECTION
    START-OF-SELECTION.
    *&  To get data from APQI table into internal table
      PERFORM populate_itab.
    **To Populate table with details to be entered into .xls file
      PERFORM build_xls_data_table.
    END OF SELECTION
    END-OF-SELECTION.
    *& To display ALV list when IT_APQI is not initial
      IF NOT it_apqi[] IS INITIAL.
    *&-- Send an Notification email
        PERFORM send_email .
    *&--To populate fields for ALV
        PERFORM build_fieldcat   .
        PERFORM build_eventcat   .
        PERFORM e04_comment_build  USING it_list_top_of_page[].
        PERFORM build_layout     .
        PERFORM build_sortcat    .
        PERFORM start_list_viewer.
      ELSE.
    *&-- If no record exists in IT_APQI internal table then message is displayed
        MESSAGE s000(zp) WITH text-021.
      ENDIF.
    FORMS **********************************
    populate itab here -
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat .
    ENDFORM.                    " BUILD_FIELDCAT
    *&      Form  BUILD_EVENTCAT
    FORM build_eventcat .
      DATA: v_header(25) .
      CONCATENATE 'ZPIPY016' p_dfrom p_dato INTO v_header.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_eventcat[]
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      READ TABLE it_eventcat WITH KEY name = slis_ev_top_of_page
                                 INTO wa_eventcat.
      IF sy-subrc = 0.
        MOVE v_formname_top_of_page TO wa_eventcat-form.
        APPEND wa_eventcat TO it_eventcat.
      ENDIF.
    ENDFORM.                    " BUILD_EVENTCAT
    *&      Form  BUILD_LAYOUT
    FORM build_layout .
      ws_layout-no_keyfix           = 'X'.
      ws_layout-group_buttons       = 'X'.
      ws_layout-colwidth_optimize   = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  BUILD_SORTCAT
    FORM build_sortcat .
      CLEAR wa_sortcat.
      CLEAR v_colpos.
    ENDFORM.                    " BUILD_SORTCAT
    *&      Form  START_LIST_VIEWER
    FORM start_list_viewer .
      DATA: ws_pgm  LIKE sy-repid.
    *& To Display ALV list
      ws_pgm = sy-repid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = ws_pgm
          is_layout          = ws_layout
          it_fieldcat        = it_fieldcat
          it_sort            = it_sortcat
          i_save             = 'A'
          it_events          = it_eventcat
        TABLES
          t_outtab           = it_apqi
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM.                    " START_LIST_VIEWER
    *&      Form  BUILD_XLS_DATA_TABLE
    FORM build_xls_data_table .
      CLASS cl_abap_char_utilities DEFINITION LOAD.
      CONSTANTS: con_tab  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
                 con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    *& To populate it_attach table to be send as email.
      CONCATENATE 'Error of transaction SM35' ' '
         INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
    *& To gettotal number of error records
      DESCRIBE TABLE it_apqi LINES v_tot_rec .
      CONCATENATE  'Number of Errors  = '  v_tot_rec
                INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      CONCATENATE text-001
                  text-002
                  text-003
                  text-004
                  text-005
                  text-006
                  text-007
                  text-008
                  text-009
                  text-010
                  text-011
                  text-012
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
    *& To populate it_attach from it_apqi
      LOOP AT it_apqi INTO wa_apqi.
    *& To get the date format in DD/MM/YYYY
        WRITE wa_apqi-credate TO v_date  DD/MM/YYYY.
    *& To get time format in hh:mm:ss.
        v_time = wa_apqi-cretime.
        CONCATENATE  v_time(2) ':' v_time2(2) ':' v_time4(2) INTO v_time.
        v_transcnt  = wa_apqi-transcnt.
        v_transcnte = wa_apqi-transcnte.
        v_transcntf = wa_apqi-transcntf.
        v_msgcnt    = wa_apqi-msgcnt.
        v_qid       = wa_apqi-qid.
        CONCATENATE wa_apqi-groupid wa_apqi-creator
                         wa_apqi-qstate v_date
                         v_time wa_apqi-progid
                         wa_apqi-userid  v_transcnt
                         v_transcnte v_transcntf
                         v_msgcnt v_qid
                   INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach  .
        CLEAR   it_attach  .
        CLEAR:  v_transcnt ,
                v_transcnte,
                v_transcntf,
                v_msgcnt   ,
                v_qid      ,
                v_date     ,
                v_time     .
      ENDLOOP.
    ENDFORM  .                    " BUILD_XLS_DATA_TABLE
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
    FORM populate_email_message_body .
      REFRESH it_message.
      it_message = 'message here'.
      APPEND it_message.
      CLEAR it_message.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    FORM send_file_as_email_attachment TABLES pit_message
                                              pit_attach
                                        USING p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     CHANGING p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email               = p_email         .
      ld_mtitle              = p_mtitle        .
      ld_format              = p_format        .
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename      .
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      v_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      v_doc_data-obj_langu = sy-langu.
      v_doc_data-obj_name  = 'SAPRPT'.
      v_doc_data-obj_descr = ld_mtitle .
      v_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR v_doc_data.
      READ TABLE it_attach INDEX v_cnt.
      v_doc_data-doc_size =
         ( v_cnt - 1 ) * 255 + STRLEN( it_attach ).
      v_doc_data-obj_langu  = sy-langu.
      v_doc_data-obj_name   = 'SAPRPT'.
      v_doc_data-obj_descr  = ld_mtitle.
      v_doc_data-sensitivty = 'F'.
      CLEAR it_attachment.
      REFRESH it_attachment.
      it_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    Create attachment notification
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num   = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES it_packing_list-body_num.
      it_packing_list-doc_type   =  ld_format.
      it_packing_list-obj_descr  =  ld_attdescription.
      it_packing_list-obj_name   =  ld_attfilename.
      it_packing_list-doc_size   =  it_packing_list-body_num * 255.
      APPEND it_packing_list.
    Add the recipients email address
      CLEAR it_receivers.
      REFRESH it_receivers.
      it_receivers-receiver = ld_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      APPEND it_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = v_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = v_sent_all
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_receivers
        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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT it_receivers.
        ld_receiver = it_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  SEND_EMAIL
    FORM send_email .
    Populate message body text
      PERFORM populate_email_message_body.
      PERFORM send_file_as_email_attachment
                                   TABLES it_message
                                          it_attach
                                    USING p_email
                                          'Error Sessions from SM35'
                                          'XLS'
                                          'filename'
                                          v_attach
                                 CHANGING gd_error
                                          gd_reciever.
    ENDFORM.                    " SEND_EMAIL
    *&      Form  E04_COMMENT_BUILD
          text
         -->E04_LT_TOP_OF_PAGE  text
    FORM e04_comment_build USING lt_top_of_page TYPE slis_t_listheader.
      CLEAR: v_fromdate,
             v_todate.
      WRITE p_dfrom TO v_fromdate  DD/MM/YYYY.
      WRITE p_dato TO  v_todate    DD/MM/YYYY.
    *& To write header in ALV list
    *& Program name
      CLEAR ws_line.
      ws_line-typ  = 'H'.
      ws_line-info = text-016.
      APPEND ws_line TO lt_top_of_page.
      CLEAR ws_line.
      ws_line-typ  = 'S'.
      ws_line-key = text-018.
      ws_line-info = v_tot_rec.
      APPEND ws_line TO lt_top_of_page.
    *& Date from
      CLEAR ws_line.
      ws_line-typ  = 'S'.
      ws_line-key  = text-050.
      ws_line-info = v_fromdate.
      APPEND ws_line TO lt_top_of_page.
    *& Date to
      CLEAR ws_line.
      ws_line-typ  = 'S'.
      ws_line-key  = text-051.
      ws_line-info = v_todate.
      APPEND ws_line TO lt_top_of_page.
    ENDFORM.                    "E04_COMMENT_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
    *& To write Heading in Top of page
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_list_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    thanks

  • Mail adapter with attachment

    hello
    I have a mail sender adapter with attachment, that I would like to transfer to other PI.
    the important is to keep the attachment and to deliever it to the PI
    any ideas?
    Kfir

    Hi,
    By using Java mapping, you can easily achieve this.
    Or use Adapter module 'PayloadSwapBean '.
    Please see the below blogs, it might be helpful to you.
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    /people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
    Regards,
    Rajesh

  • Mail sending with attachment

    Hi all,
            i'm working on badi i need to send a mail with excel attachment, if you have sample code pls
    send me.
    Regards
    Suprith

    hi
    refer to this thread
    Re: Send mails with attachment to external email id
    hope this helps
    regards
    Aakash Banga

  • Mail Receiver Adapter Attachment Content Encoding

    Hello to all,
    we use a mail receiver adapter to sent XI messages as email. Everything works fine but the content encoding of the  attachment is set to UTF-8. I need ISO-8859-1 instead of UTF-8. How could I achieve this ?
    Thanks Christian

    Hello Stefan,
    we've tried this too (content type to: text/plain;charset="ISO-8859-1"), but it didn't work.
    This is our output structure
    <?xml version="1.0" encoding="ISO-8859-1"?><ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30"><Subject>Daten von 01.07.2008 12:20</Subject><From>mail(at)dummy.de</From><To>max.muster(at)web.de</To><Content_Type>multipart/mixed; boundary="--AaZz"</Content_Type><Content>----AaZz
    Content-Type: text/html; charset=ISO-8859-1
    Content-Disposition: inline
    Mit freundlichen Grüßen
    ----AaZz
    Content-Type: text/plain; charset=ISO-8859-1; name=Daten 01.07.2008 1220.txt
    Content-Disposition: attachment; filename=Daten 01.07.2008 1220.txt
    "N";2000000003;"1234123412341234";1234500009;000000000000;01;"L";"OKDAU";1;"Prof. Dr.";"Max";"Mustermann";"";"Musterstraße";"";000000;"PLZ45";"Musterhausen";"";19990101;"max.mustermann(at)muster.com";"";"";"";"";"1";"Titel";"Vorname";"Name";"20000101";"";"0";"Max Mustermann";"L";"BLZ";"100000001";"Musterbank";00;;01;000000;;;00;1;0;0;1;0;"ForumNr";1;1;0;1;0;1;0;0;20080620;0;;0;20080620;0;20080620;0002;STANDARD
    "N";2000000004;"5678567856785678";1234567009;000000000000;01;"L";"OKDAU";1;"Prof. Dr.";"Stefan";"Maier";"";"Teststraße";"";000000;"PLZ65";"Testhausen";"";19991201;"stefan.maier(at)test.de";"";"";"";"";"1";"Titel";"Vorname";"Name";"20001201";"";"0";"Stefan Maier";"L";"BLZ";"100000001";"Testbank";00;;01;000000;;;00;1;0;0;1;0;"ForumENr";1;1;0;1;0;1;0;0;20080620;0;;0;20080620;0;20080620;0002;STANDARD</Content></ns:Mail>
    But the attachment is UTF-8
    Thanks for your help.
    Christian

  • Mail Sender to Abap Proxy Receiver with Attachements

    Hi All,
    Scenario: I need to create a ticket in Solman from a mail. I intend to do the scenario as Mail sender to Abap Proxy receiver asynchronous.
    I have configured my sender mail adapter and am able to get the mails in XI. The attachements also appear in Inbound payload as MailAttachement-1, MailAttachement-2 etc. I have checked use mail packege and keep attachements in sender adapter.
    Transport Protocol: IMAP4
    Message Protocol: XIPAYLOAD
    Queries:
    1. My Inbound Data Type is the mail Package -- ximail30_xsd. Here in sxmb_moni I can see the mail attributes like from, to and the mail body in content. But How can I read the attachements in my message mapping.
    2. How can I pass these attachements to Abap Proxy ( I do not need to alter attachments only pass to proxy ). These attachements have to be attached to the Solman ticket in SOLMAN server.
    Appreciate your kind response to my above queries.
    Thanks.
    Regards,
    Siddhesh S.Tawate
    PS: I have tried using PayloadSwapBean in adapter module but still the content at source remains same.

    Hi,
    Please find below the part of code that might help you. I have given code only responsible for attachements part of the ticket.
    loop at lt_attach into l_attachment.
            count = count + 1.
            if count = 1.
              first_line = 1.
            endif.
            l_type = l_attachment->GET_CONTENT_TYPE( ).
            split l_type at '"' into l_type
                                     file_name
                                     l_name.
            l_name = file_name.
            split file_name at '.' into file_name
                                        file_type.
            l_xstring = l_attachment->GET_BINARY_DATA( ).
            strlen = xstrlen( l_xstring ).
            Compute int = ( strlen div 255 ).
            Compute rem = ( strlen mod 255 ).
            if rem <> 0.
              int = int + 1.
            endif.
            count1 = int.
            if count = 1.
              last_line = count1.
            else.
              if int = 1.
                first_line = last_line.
              else.
                last_line = first_line + count1.
              endif.
            endif.
            wa_APPX_HEADERS-APPXNO = count.
            wa_APPX_HEADERS-DESCR = l_name.
            wa_APPX_HEADERS-FILETYP = file_type.
            wa_APPX_HEADERS-FILENAM = l_name.
            wa_APPX_HEADERS-FILEFM_UL = 'BIN'.
            wa_APPX_HEADERS-FIRSTL = first_line.
            wa_APPX_HEADERS-LASTL = last_line.
            wa_APPX_HEADERS-FILELEN = strlen.
            wa_APPX_HEADERS-LAST_USR = sy-uname.
            GET TIME STAMP FIELD wa_appx_headers-TIMESTAMP.
            append wa_APPX_HEADERS to it_APPX_HEADERS.
            while count1 <> 0.
              count1 = count1 - 1.
              if count1 <> 0.
                wa_APPX_LINES_bin-LINE = l_xstring+0(255).
                shift l_xstring left by 255 places in BYTE MODE.
              ELSE.
                wa_APPX_LINES_bin-LINE = l_xstring.
              endif.
              append wa_APPX_LINES_bin to it_APPX_LINES_bin.
              clear: wa_APPX_LINES_bin, wa_APPX_LINES.
            endwhile.
            first_line = last_line + 1.
            clear: strlen, count1, file_name, file_type, l_type, int, rem, l_xstring, l_attachment.
          endloop.
    CALL FUNCTION 'BAPI_NOTIFICATION_CREATE'
            EXPORTING
              NOTIF_EXT                = wa_NOTIF_EXT
            NOTIF_CRM                = wa_NOTIF_CRM
      IBASE_DATA               =
         IMPORTING
           NUMBER                   = Refnum
           NUMB                     = Numb
           REFNUM                   = Ticket_No
           SYSID                    = SYSID
            TABLES
              NOTIF_PARTNERS           = it_NOTIF_PARTNERS
            NOTIF_NOTES              = it_NOTIF_N_EXT
              NOTIF_SAP_DATA           = it_NOTIF_SAP_DATA
            NOTIF_TEXT_HEADERS       = it_NOTIF_TEXT_HEADERS
            NOTIF_TEXT_LINES         = it_NOTIF_TEXT_LINES
            APPX_HEADERS             = it_APPX_HEADERS
            APPX_LINES               = it_APPX_LINES
            APPX_LINES_BIN           = it_APPX_LINES_BIN
             RETURN                   = RETURN
    Please observe how first and last line of attachement is calculated. That is what created problem for me initially.
    Hope this helps.
    Regards,
    Siddhesh S.Tawate

  • Mail Receiver and Attachment Issue - how to get an attachment into the body

    I have an abap proxy that sends a simple message to XI with a pdf attachment. XI maps the xml message to the Mail Adapters Mail Package format.
    To have the email sent with the PDF attachment I must click the "keep attachments" option. However this also has the side-effect of making the message payload an attachment as well (seems silly?). Therefore I get an email with two attachments: one is the PDF and the other is the plain text that should be in the email body.
    The question is: How do I get that plain text attachment back into the Message Body ? I have tried all combinations of the MessageTranformBean and the PayloadSwapBean with no luck.
    I can easily change the names of the attachments with the MessageTransformBean but if I set the text attachment to Transform.ContentDisposition inline, it still just comes out as an attachment. And, if I use the payloadswapbean the adapter log says it corectly swapped the right payload however the email still comes out with the text as an attachment!!
    Any ideas on how I can do this? Is it a bug in the module beans?
    (I'm using MS Outlook as the email client.)
    Maybe I need to write my own module bean to do this... If I set keep attachments to OFF, can I still set the PDF attachment with my own modules (the reason I ask this is that with keep-attachment OFF, the message body correctly has the text in it...
    Regards,
    Jason.
    Edited by: Jason Scott on Mar 6, 2008 3:22 AM

    Hi,
    Check these
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    Regards
    Seshagiri

  • Mail package with attachment

    Hi,
    I have to send a flat file as attachment through the mail adapter in combination with the mail package because I have to communicate with several partners and I want to determine dynamically the "To:" depending on a field in the source structure (an IDoc).
    The scenario is almost complete. I've created the file as mail attachment using the MessageTransformBean module and it works fine but how can I map the xml structure needed for the mail package?
    I've already check the following weblogs but I didn't find the answer to my question.
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/srinivas.reddy/blog/2005/02/11/model-driven-architecturemda-for-dummies
    Thank you!
    Ciao
    Stefano

    Hi Stefano,
    Refer to the How-to Guide on Mail Adapter at the below link.
    https://websmp103.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202&_OBJECT=011000358700004556712005E
    Rgds,
    Sam Raju

  • Mail Sending with attachement

    Hello,
    I have one Modulepool having Z Transaction which sends the mail through workflow.
    I have created a task and bussiness object.
    Using FM SAP_WAPI_START_WORKFLOW to send the workitem in SAP inbox.
    That is attached to a standard Transaction CJ20n.
    I added the CC for sending mail.
    But if one user double click, then the WI will trrigerred and workflow completed and the second will not b able to c the WI.
    I want to send the mail to the second user with that T Code as Attachment.
    How to do this.
    Please Help.
    With Regards,
    Nitin Malhotra

    Here's how I do it, without attachments though (names, users, and servers changed):
    connect system/******@mydb as sysdba
    alter system set smtp_out_server='MAIL.k12.sd.us' SCOPE=BOTH;
    @I:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlmail.sql;
    @I:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\prvtmail.plb;
    GRANT execute ON utl_mail TO USER1;
    connect USER1/******@mydb;
    CREATE OR REPLACE PROCEDURE USER1.E_MAIL_MESSAGER IS
    vSender VARCHAR2(30) := '[email protected]';
    vRecip VARCHAR2(30) := '[email protected]';
    vSubj VARCHAR2(50) := 'TCHNAME_STUDENTS_INSERT';
    vMesg VARCHAR2(4000):='TCHNAME_STUDENTS SUCCESSFUL';
    vMType VARCHAR2(30) := 'text/plain; charset=us-ascii';
    BEGIN
    utl_mail.send(vSender, vRecip, NULL, NULL, vSubj,vMesg, vMType,
    NULL);
    END E_MAIL_MESSAGER;
    Rem Now to call the procedure to run it:
    exec E_MAIL_MESSAGER;

  • How to determine sap mail receiver with raw id?

    I need to get all those mails which have been send to a special mailadress customized in sap system.
    where can i find the receiver mailadresses?          (Are they related to any key in sood? RAW ID?)

    Hi,
    most of the component executables can be run at OS level with option -version or -v or -V  to check for the version info, or check the relevant trace file header
    for J2EE related, check out: /usr/sap/<SID>/<instanceID>/j2ee/cluster/server0/version.txt
    Regards,
    Vincent

  • Photo's sent via email not being received with attachment file

    I have a question regarding emailing photos (jpg) files. Though I am able to send the JPG files, when the person receives them they only see the picture but do not have the ability to download the attachment as none is visible. I have tried various methods but none have helped me. Also, can iPhoto import RAW ?

    when the person receives them they only see the picture but do not have the ability to download the attachment as none is visible.
    If they can see the picture then they have got the file. It's a setting on their end to figure out how to download it.
    Also, can iPhoto import RAW ?
    Er, yes but... RAW is a generic term for these files but every camera produces a different form of RAW file, so it's a question of what formats are supported on v6 of iPhoto (a few) on 10.3 (very few).
    Regards
    TD

Maybe you are looking for