Sending Image attachment Using Mail 7.3 and OS X 10.9.3.

For some reason sending an email with an image attached and when I select the large image size drop down menu it does not change the actual size of the image attachment. Instead it stays the same as the medium image size. In fact the message size remains the same. However I can chafe to small, medium, and actual size but not large! Can anybody help?
Thanks in advance,
Michael

That's what I thought you might have meant, but wasn't quite sure. I think in this case that Mail simply can't make a "large" and "medium" image different sizes. I don't know what Mail's mechanism is for doing this, but I often find the same thing occurring with images I attach. Sometimes there is no choice that works. The image size is just what it was when attached.
I wish I had a better answer for you than, "it is what it is." But I don't think there's a problem you can solve. Mail is functioning as it "normally" functions, at least from my experience.

Similar Messages

  • I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    It will time out, if it hasn't already. Delete the message from the Outbox.

  • How to send image file through mail without   any attachment

    Plz tell  me how to send image file through mail without any attachment  ( i mean not converting  that image into pdf or any format )  i want to send that text or image  through mail .

    Hi Sandeep,
    I think you can setup the type of email in Shared office Settings in transaction S016.
    There is an option called <Preset document classes>
    You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
    http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
    Haven't tried it though.
    Regards,
    Siddhesh

  • When I send image attachments through Mail they are received as very small and squashed. How can I change this?

    I have a problem sending image attachements (e.g., jpeg, png files etc) with the Mail utility from my MacBook Pro.  When people receive my email the attached image shows up not as an attached file that can be saved or downloaded, but as just a very small, squashed up version of the image imbedded in the email message itself.
    I usually add these attachments by simply dragging and dropping the desired file into the window of the email text. Is this the wrong way to do it?
    thanks
    Jerry

    Is this the wrong way to do it?
    The safest way to send images is to create a compressed file and send that.
    Click the image you want to send, go to File in the menu bar and select Compress... You end up with a file with a .zip at the end. Attach that to your email. Then trash the .zip file.
    The person at the other end only has to double click the .zip attachment.
    You can compress are single image or a folder of them.

  • Is it possible to send xls attach in mail in background ?

    is it possible to send xls attach in mail in background ?
    i build/copy program to send attach file in xls format  ,
    its work fine in foreground but do nothing in background  ,
    What can be the reason?
    the section of the sending  :
      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.
      W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME  = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU  = SY-LANGU.
      W_DOC_DATA-OBJ_NAME   = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR  = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = PIT_ATTACH[].
    Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM   = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE   =  LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR  =  LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME   =  LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE   =  T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = LD_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
    T_RECEIVERS-NOTIF_DEL = 'X'.
    T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = W_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                = W_SENT_ALL
        TABLES
          PACKING_LIST               = T_PACKING_LIST
          CONTENTS_BIN               = T_ATTACHMENT
          CONTENTS_TXT               = IT_MESSAGE
          RECEIVERS                  = T_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 T_RECEIVERS.
        LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
      ENDLOOP.

    Try this example, not sure where I got this, but it works.
    report zmail_excel.
    parameters: p_email   type somlreci1-receiver
                                   default '[email protected]'.
    data: begin of it001 occurs 0,
          bukrs type t001-bukrs,
          butxt type t001-butxt,
          end of it001.
    data:   imessage type standard table of solisti1 with header line,
            iattach type standard table of solisti1 with header line,
            ipacking_list like sopcklsti1 occurs 0 with header line,
            ireceivers like somlreci1 occurs 0 with header line,
            iattachment like solisti1 occurs 0 with header line.
    start-of-selection.
      select bukrs butxt into table it001 from t001.
    *   Populate table with detaisl to be entered into .xls file
      perform build_xls_data .
    * Populate message body text
      clear imessage.   refresh imessage.
      imessage = 'Please find attached excel file'.
      append imessage.
    * Send file by email as .xls speadsheet
      perform send_email_with_xls tables imessage
                                          iattach
                                    using p_email
                                          'Example Excel Attachment'
                                          'XLS'
                                          'TestFileName'
                                          'CompanyCodes'.
    *      Form  BUILD_XLS_DATA
    form build_xls_data .
      constants: con_cret type x value '0D',  "OK for non Unicode
                 con_tab type x value '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *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.
      concatenate 'BUKRS' 'BUTXT'
             into iattach separated by con_tab.
      concatenate con_cret iattach into iattach.
      append  iattach.
      loop at it001.
        concatenate it001-bukrs it001-butxt
               into iattach separated by con_tab.
        concatenate con_cret iattach  into iattach.
        append  iattach.
      endloop.
    endform.
    *      Form  SEND_EMAIL_WITH_XLS
    form send_email_with_xls tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription.
      data: xdocdata like sodocchgi1,
            xcnt type i.
    * Fill the document data.
      xdocdata-doc_size = 1.
    * Populate the subject/generic message attributes
      xdocdata-obj_langu = sy-langu.
      xdocdata-obj_name  = 'SAPRPT'.
      xdocdata-obj_descr = p_mtitle .
    * Fill the document data and get size of attachment
      clear xdocdata.
      read table iattach index xcnt.
      xdocdata-doc_size =
         ( xcnt - 1 ) * 255 + strlen( iattach ).
      xdocdata-obj_langu  = sy-langu.
      xdocdata-obj_name   = 'SAPRPT'.
      xdocdata-obj_descr  = p_mtitle.
      clear iattachment.  refresh iattachment.
      iattachment[] = pit_attach[].
    * Describe the body of the message
      clear ipacking_list.  refresh ipacking_list.
      ipacking_list-transf_bin = space.
      ipacking_list-head_start = 1.
      ipacking_list-head_num = 0.
      ipacking_list-body_start = 1.
      describe table imessage lines ipacking_list-body_num.
      ipacking_list-doc_type = 'RAW'.
      append ipacking_list.
    * Create attachment notification
      ipacking_list-transf_bin = 'X'.
      ipacking_list-head_start = 1.
      ipacking_list-head_num   = 1.
      ipacking_list-body_start = 1.
      describe table iattachment lines ipacking_list-body_num.
      ipacking_list-doc_type   =  p_format.
      ipacking_list-obj_descr  =  p_attdescription.
      ipacking_list-obj_name   =  p_filename.
      ipacking_list-doc_size   =  ipacking_list-body_num * 255.
      append ipacking_list.
    * Add the recipients email address
      clear ireceivers.  refresh ireceivers.
      ireceivers-receiver = p_email.
      ireceivers-rec_type = 'U'.
      ireceivers-com_type = 'INT'.
      ireceivers-notif_del = 'X'.
      ireceivers-notif_ndel = 'X'.
      append ireceivers.
      call function 'SO_DOCUMENT_SEND_API1'
           exporting
                document_data              = xdocdata
                put_in_outbox              = 'X'
                commit_work                = 'X'
           tables
                packing_list               = ipacking_list
                contents_bin               = iattachment
                contents_txt               = imessage
                receivers                  = ireceivers
           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.
    endform.
    Regards,
    Rich Heilman

  • Send excel attachment using FM SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi ABAPers,
    I managed to send excel attachment using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    Let say I send it to my own email account.
    But, when try to open the excel document, from lotus notes, there is warning message produced by the microsoft excel saying:
    "The file is not in a recognizable format.
    and so on....."
    Anyway, when I click button 'OK', excel sheet will be opened and no information lost.
    How can we code the abap program so that the message will not come each time I open the attachment from my lotus notes?
    Or this is just the tab delimited issue?
    Thank you.
    Regards,
    Edward.

    Hi Shan,
    Thank you for replying.
    I have the same as follows:
      DESCRIBE TABLE lt_contents_hex LINES lv_lines.
      lt_packing_list-transf_bin = 'X'.
      lt_packing_list-head_start = 1.
      lt_packing_list-head_num   = 1.
      lt_packing_list-body_start = 1.
      lt_packing_list-body_num   = lv_lines.
      lt_packing_list-doc_type   = 'XLS'.
      lt_packing_list-obj_name   = 'ATTACHMENT'.
      lt_packing_list-obj_descr  = 'Attachment'.
      lt_packing_list-doc_size   = lv_lines * 255.
      APPEND lt_packing_list.
    I'm using lt_contents_hex instead of lt_contents_bin.
    Still the problem is there.
    Is there any other way to calculate the doc size correctly?
    Regards,
    Edward.

  • When I send an attachment using Word for MAC people have a hard time opening it with a PC. Can I do anything different?MAC

    When I try to send an attachment using Word for MAC people have a hard time opening it with a PC. Can I do anything different?

    shldr2thewheel already sent a teach-yourself way. Perhaps you could be more specific: any .doc file written in Mac OS is opened with difficulty? what version of Office on mac and what version in windows? any format, e.g. .doc or .rtf? Even a simple rtext of, say, 2-3 pages? or only long docs, e.g. 100 pages or more? what language is used? English or any other West European, Latin based text, or other scripts too? What do you understand by ‘people have a hard time opening it with a PC?’ takes a very long time? or does not open at all? etc. etc.

  • How to send pdf attachment through mail using Webdynpro-Java

    How can i send the Adobe Interactive Form with data involved as a PDF attachment to mail? using Webdynpro-Java.
    Is there any Adobe API or jar file for generating pdf?
    Helpful answer is highly appreciable and rewarded with points.!

    Hi Sankar,
    try [Offline Interactive PDF Form Using E-Mail|/docs/DOC-8061#49]
    Michal

  • Sending Duplicate emails using Mail and mBox for mac

    I have been sending duplicate emails inadvertantly recently.  It seems it's when I use mBox for mac (registered copy) in Mail to use my Hotmail with IMAP.
    I hadn't noticed it at first, but now I see everytime I send a mail I get 2 copies in my sent box.  I can turn off the store sent messages on server option to fix it (but that's the whole point of having IMAP!!), or I can turn off mBox for mac and it also seems to work (but then I can't use IMAP!).    I've also tried on the same machine from gmail, and iCloud accounts (MobileMe), and I had no issue at all.  I've also tried 2 different Hotmail accounts, and both of them send double messages every time I send. 
    I've searched for a loooooong time, and can't find anyone with a similar issue - but surely I'm not the only one?  I think anyone still using a hotmail account will eventually install something like mBox for mac if they've gone Mac recently - as I have.
    I checked the mail headers of the 2 mails, and they are quite different (masked where appropriate) -
    Mail 1 -
              From:   xxxxx <[email protected]>
              Subject:           Test 19th
              Date:           May 29, 2012 12:06:19 AM GMT+08:00
              To:   yyyyy <[email protected]>
      Content-Type:           text/plain
      Content-Transfer-Encoding:           7bit
              X-Smtp-Server:           smtp.live.com:[email protected]
              X-Universally-Unique-Identifier:           fb14cd4f-e68c-43fa-8d0b-950df8394fde
              Message-Id:           <[email protected]>
              Mime-Version:           1.0 (Apple Message framework v1278)
    Mail 2 -
              From:   xxxxx <[email protected]>
              Subject:           Test 19th
              Date:           May 29, 2012 12:06:19 AM GMT+08:00
              To:   yyyyy <[email protected]>
              X-Originating-Ip:           [zzz.zzz.zzz.zzz]
              X-Originating-Email:           [[email protected]]
              Message-Id:           <[email protected]>
              Received:           from [192.168.1.52] ([zzz.zzz.zzz.zzz]) by BLU0-SMTP71.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 28 May 2012 09:06:21 -0700
      Content-Type:           text/plain
      Content-Transfer-Encoding:           7bit
              Mime-Version:           1.0 (Apple Message framework v1278)
              X-Mailer:           Apple Mail (2.1278)
              X-Originalarrivaltime:           28 May 2012 16:06:21.0350 (UTC) FILETIME=[D2B26460:01CD3CEB]
    I'm surprised I can't find anyone else with a similar issue.  I've submitted a support ticket with mBox/fluent factory, but I'm still not convinced it's their issue, and possibly a Mail on Mac issue.
    Does anybody have any suggestions?  Thanks for your help!

    @ Kokola
    Great staff!!! MBox Fluent Factory is very poor app.
    I was having problem with duplicated sent emails and cleaning up my inbox, sent items and deleting emails. Try to contact them via email for over 3 months and never got a reply!
    I just used the suggested configuration and my Entourage (email app for MAC) is working perfetcly. I can visualise all my online folders now!
    Thank you so much!
    mBox never addressed the issue and the duplicated emails reached new levels of annoyance but the good thing is that Hotmail and Outlook.com finally rolled out support for IMAP.
    Incoming Mail Server: imap-mail.outlook.com
    Outgoing Mail Server: smtp-mail.outlook.com
    http://windows.microsoft.com/en-us/windows/outlook/send-receive-from-app
    No more duplication issues once you switch over, and no need for a third party (mBox)software to bridge the missing feature gap.

  • I send images attached. Others rcv them embedded

    I have to send image files of ads out to a lot of newspapers and clients. I've always sent them as .jpg attachments. Last week they all started saying they were were receiving them as unusable embedded. They want me to resend as attached jpgs. Since that's what I did in the first place, I don't know what to do different.
    If I change them to pdfs, they get them ok, but that is inconvenient for our workflow. How can I again send jpgs?

    Your OS detail provided indicates you are running 10.4.4. Any reason you have not updates to 10.4.8?
    Are you using RTF or Plain Text for message composition and are you including a Signature?
    If you are using RTF for message composition (which is really HTML with Tiger Mail), try using Plain Text instead which should resolve it. More than likely these recipients are using Windows Outlook as their email client which depending on the version used has problems with Tiger Mail's RTF.

  • Problem in sending the attachment using SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi,
    I have a requirement to send the details of an internal table to External mail as an attachment. I have used fn.module 'SO_NEW_DOCUMENT_ATT_SEND_API1' to do so. I am getting the attachment but the data is stored in only one row when we checked it in SAP outbox. This is irrespective of TXT, XLS etc. I can not check the exact file in my external mail inbox as the connection is not established in dev & Quality systems. This question was raised earlier by other guys and there was no correct answer provided. If any of you encountered this type of problem & got the solution please help.
    Thanks,
    Ashok

    Hi Buddy,
        Hope this piece of code will definately help you out, Its working at my end.
    Thanks,
    Krishna..
    FORM p_send_email .
      FIELD-SYMBOLS: <field> TYPE ANY.
      DATA : BEGIN OF i_dload OCCURS 0 ,
             dload(1000) ,
           END OF i_dload .
      DATA: it_receivers LIKE somlreci1 OCCURS 1 WITH HEADER LINE,
              w_object_content LIKE solisti1 OCCURS 1 WITH HEADER LINE.
      DATA: w_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
      DATA :w_records TYPE zres_records.
      DATA: w_rsnum(10),
            w_bdmng(14),
            w_meins(4).
      DATA: ws_email LIKE adr6-smtp_addr.  "for internal e_mail address
      DATA: ws_email1 LIKE adr6-smtp_addr. "for external e_mail address
    *--Internal table declaration
      DATA: it_objpack   LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
      DATA: it_objhead   LIKE solisti1 OCCURS 1 WITH HEADER LINE.
      DATA: it_objbin    LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA: it_objtxt    LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA: it_reclist   LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
      DATA: doc_chng  LIKE sodocchgi1.
      DATA: tab_lines LIKE sy-tabix.
      DATA: w_longtext(500) TYPE c.
      DATA: v_date(10) TYPE c.
      DATA: text(200)  TYPE c.
      DATA: w_text(50) TYPE c.
    *--Get receipient address
      CLEAR it_reclist.
    *--To send error to internal mail
      ws_email = p_email.
    *--To send error to external mail
      ws_email1 = p_email1.
    *---setting name of file for csv
      CONCATENATE text-003 p_bdoc text-004 INTO w_filename.
      CONDENSE w_filename NO-GAPS.
      IF flag <> 1.
        IF p_email1 IS NOT INITIAL.
    build body of message
          CONCATENATE 'disply message ' ' ' INTO it_objtxt
           SEPARATED BY space.
          APPEND it_objtxt.
          CLEAR it_objtxt.
          it_reclist-receiver = ws_email1.
          it_reclist-rec_type = c_u.
          it_reclist-express  = ' '.
          it_reclist-com_type = 'INT'.
          APPEND it_reclist.
    Set title of object and email
          CLEAR: w_text.
         CONCATENATE 'Greenheck Packing List Data'
                            INTO w_text SEPARATED BY space.
          doc_chng-obj_descr = text-005. "w_text.
          doc_chng-obj_name  = 'Inbound EDI'.
          DESCRIBE TABLE it_objtxt LINES tab_lines.
          READ TABLE it_objtxt INDEX tab_lines.
          doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_objtxt ).
    *--Move the Report Name as the Heading line for email file
          CLEAR: w_longtext.
    MOVE: text-012 TO w_longtext.
          w_longtext = 'name of report for testing'.
          it_objbin = w_longtext.
          APPEND it_objbin. CLEAR it_objbin.
    *--Append Blank Lines
          APPEND it_objbin. CLEAR it_objbin.
          APPEND it_objbin. CLEAR it_objbin.
    *User name
          CLEAR text.
          MOVE: 'User:' TO text,
                 sy-uname TO text+6.
          it_objbin = text.
          APPEND it_objbin. CLEAR it_objbin.
    ---appending heading to Internal table of Email
          CLEAR: w_longtext, w_xblnr_1 , w_aubel_1,   w_vemng_1,
                 w_matnr_1,  w_harmdesc_1, w_hc_1, w_cooland1_1,
                 w_brgew_1,  w_tknum_1,   w_vbeln_1,  w_vbeln1_1,
                 w_exidv_1,  w_vhilm_1,   w_pack_no_1,
                 w_brgew1_1, w_laeng_1,   w_breit_1,
                 w_hoehe_1,   w_vol_1.
          w_xblnr_1 = 'Cust PO No.'.
          w_aubel_1 = 'Sal Order'.
          w_vemng_1 = 'Pack Qty'.
          w_matnr_1 = 'Model no.'.
          w_harmdesc_1 = 'Hrm Desc'.
          w_hc_1 = 'Hrm Code'.
          w_cooland1_1 = 'Country of Origin'.
          w_brgew_1 = 'Net Wt.'.
          w_tknum_1 = 'Shipment'.
          w_vbeln_1 = 'Billing Doc'.
          w_vbeln1_1 = 'Delivery'.
          w_exidv_1 = 'Pkg ID'.
          w_vhilm_1 = 'Pkg Desc'.
          w_pack_no_1 = 'Pkg No.'.
          w_brgew1_1 = 'Gross Wt'.
          w_laeng_1 = 'Length'.
          w_breit_1 = 'Width'.
          w_hoehe_1 = 'Height'.
          w_vol_1 = 'Cubic Mtr'.
          CONCATENATE w_xblnr_1  w_aubel_1   w_vemng_1
                      w_matnr_1  w_harmdesc_1 w_hc_1   w_cooland1_1
                      w_brgew_1  w_tknum_1   w_vbeln_1  w_vbeln1_1
                      w_exidv_1  w_vhilm_1   w_pack_no_1
                      w_brgew1_1 w_laeng_1   w_breit_1
                      w_hoehe_1   w_vol_1
          INTO w_longtext SEPARATED BY ','.
          it_objbin = w_longtext.
          APPEND it_objbin. CLEAR it_objbin.
          LOOP AT it_tab.
            DO.
              ASSIGN COMPONENT sy-index OF STRUCTURE it_tab TO <field>.
              IF sy-subrc <> 0.
                EXIT.
              ENDIF.
    Look for Commas in the field value.  If it exists, put quotes around
    value so that the file opens correctly with all the columns aligned
    in Excel.
              SEARCH <field> FOR ',' IN CHARACTER MODE.
    If search for commas was successful.
              IF sy-subrc = 0.
                CONCATENATE '"' <field> '"' INTO <field> IN CHARACTER MODE.
              ENDIF.
              IF sy-index = 1.
                i_dload-dload = <field>.
                SHIFT: i_dload-dload  LEFT DELETING LEADING space.
              ELSE.
    Put Comma as a separator for values in IT_DLOAD internal table
                SHIFT: i_dload-dload  LEFT DELETING LEADING space.
                CONCATENATE i_dload-dload <field> INTO i_dload-dload
                            SEPARATED BY ',' IN CHARACTER MODE.
              ENDIF.
            ENDDO.
            it_objbin = i_dload-dload.
            APPEND it_objbin. CLEAR it_objbin.
          ENDLOOP.
              flag = 1.
            endif.
        ENDIF.
    ---if to send error file.
        IF p_email IS NOT INITIAL.
    build body of message
          CONCATENATE 'Errors in file ' ' ' INTO it_objtxt
           SEPARATED BY space.
          APPEND it_objtxt.
          CLEAR it_objtxt.
          it_reclist-receiver = ws_email.
          it_reclist-rec_type = c_u.
          it_reclist-express  = ' '.
          it_reclist-com_type = 'INT'.
          APPEND it_reclist.
    Set title of object and email
          CLEAR: w_text.
       CONCATENATE 'Greenheck Packing List Data'
                          INTO w_text SEPARATED BY space.
          doc_chng-obj_descr = text-005.
          doc_chng-obj_name  = 'Inbound EDI'.
          DESCRIBE TABLE it_objtxt LINES tab_lines.
          READ TABLE it_objtxt INDEX tab_lines.
          doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_objtxt ).
    *--Move the Report Name as the Heading line for email file
          CLEAR: w_longtext.
    MOVE: text-012 TO w_longtext.
          w_longtext = 'name of report for testing'.
          it_objbin = w_longtext.
          APPEND it_objbin. CLEAR it_objbin.
    *--Append Blank Lines
          APPEND it_objbin. CLEAR it_objbin.
          APPEND it_objbin. CLEAR it_objbin.
    *User name
          CLEAR text.
          MOVE: 'User:' TO text,
                 sy-uname TO text+6.
          it_objbin = text.
          APPEND it_objbin. CLEAR it_objbin.
    ---appending heading to Internal table of Email
          CLEAR: w_longtext, w_xblnr_1 , w_aubel_1,   w_vemng_1,
                 w_matnr_1,  w_harmdesc_1, w_hc_1,  w_cooland1_1,
                 w_brgew_1,  w_tknum_1,   w_vbeln_1,  w_vbeln1_1,
                 w_exidv_1,  w_vhilm_1,   w_pack_no_1,
                 w_brgew1_1, w_laeng_1,   w_breit_1,
                 w_hoehe_1,   w_vol_1, w_error.
          w_xblnr_1 = 'Cust PO No.'.
          w_aubel_1 = 'Sal Order'.
          w_vemng_1 = 'Pack Qty'.
          w_matnr_1 = 'Model no.'.
          w_harmdesc_1 = 'Hrm Desc'.
          w_hc_1 = 'Hrm Code'.
          w_cooland1_1 = 'Counrty of Origin'.
          w_brgew_1 = 'Net Wt.'.
          w_tknum_1 = 'Shipment'.
          w_vbeln_1 = 'Billing doc'.
          w_vbeln1_1 = 'Delivery'.
          w_exidv_1 = 'Pkg ID'.
          w_vhilm_1 = 'Pkg Desc'.
          w_pack_no_1 = 'Pkg No.'.
          w_brgew1_1 = 'Gross Wt'.
          w_laeng_1 = 'Length'.
          w_breit_1 = 'Width'.
          w_hoehe_1 = 'Height'.
          w_vol_1 = 'Cubic Mtr'.
          w_error = 'Error'.
          CONCATENATE w_xblnr_1  w_aubel_1   w_vemng_1
                      w_matnr_1  w_harmdesc_1 w_hc_1  w_cooland1_1
                      w_brgew_1  w_tknum_1   w_vbeln_1  w_vbeln1_1
                      w_exidv_1  w_vhilm_1   w_pack_no_1
                      w_brgew1_1 w_laeng_1   w_breit_1
                      w_hoehe_1   w_vol_1 w_error
          INTO w_longtext SEPARATED BY ','.
          it_objbin = w_longtext.
          APPEND it_objbin. CLEAR it_objbin.
    *--Append the details to Internal table of Email
          LOOP AT it_tab.
            DO.
              ASSIGN COMPONENT sy-index OF STRUCTURE it_tab TO <field>.
              IF sy-subrc <> 0.
                EXIT.
              ENDIF.
    Look for Commas in the field value.  If it exists, put quotes around
    value so that the file opens correctly with all the columns aligned
    in Excel.
              SEARCH <field> FOR ',' IN CHARACTER MODE.
    If search for commas was successful.
              IF sy-subrc = 0.
                CONCATENATE '"' <field> '"' INTO <field> IN CHARACTER MODE.
              ENDIF.
              IF sy-index = 1.
                i_dload-dload = <field>.
                SHIFT: i_dload-dload  LEFT DELETING LEADING space.
              ELSE.
    Put Comma as a separator for values in IT_DLOAD internal table
                SHIFT: i_dload-dload  LEFT DELETING LEADING space.
                CONCATENATE i_dload-dload <field> INTO i_dload-dload
                            SEPARATED BY ',' IN CHARACTER MODE.
              ENDIF.
            ENDDO.
            it_objbin = i_dload-dload.
            APPEND it_objbin. CLEAR it_objbin.
          ENDLOOP.
           flag = 0.
          endif.
    -Convert to correct format----
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = it_objbin
          objcont_new = it_objbin.
    create the control table entry for the main email
      DESCRIBE TABLE it_objtxt LINES tab_lines.
      CLEAR it_objpack-transf_bin.
      it_objpack-head_start = 1.
      it_objpack-head_num   = 0.
      it_objpack-body_start = 1.
      it_objpack-body_num   = tab_lines.
      it_objpack-doc_type   = 'RAW'.
      APPEND it_objpack.
      DESCRIBE TABLE it_objbin LINES tab_lines.
      it_objpack-head_start = 1.
      it_objpack-head_num   = 0.
      it_objpack-body_start = 1.
      it_objpack-body_num   = tab_lines.
      it_objpack-transf_bin = c_x.
      it_objpack-doc_type   = 'CSV'.
      it_objpack-obj_descr  = w_filename. "'billing doc no.csv'.
      it_objpack-obj_name   = 'Billing Doc'.
      it_objpack-doc_size   = tab_lines * 255.
      APPEND it_objpack.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = doc_chng
         PUT_IN_OUTBOX              = c_x
          commit_work                = c_x
        TABLES
          packing_list               = it_objpack
         object_header              = it_objhead
          contents_bin               = it_objbin
          contents_txt               = it_objtxt
          receivers                  = it_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
      IF sy-subrc <> 0.
        WRITE: / 'failure in sending mail'.
      ELSE.
         if flag = 0.
           MESSAGE s999(pp) WITH text-007.
         endif.
         if flag = 1.
           MESSAGE s999(pp) WITH text-006.
         endif.
       WRITE: / 'success in sending mail'.
      ENDIF.
        ENDFORM.                    " p_send_email

  • Sending PDF attachment in mail

    My requirement is to send PDF as attachment in mail. Also require to password protect it. I've searced a lot in the forums and found many threads, but no solid solution... Has anyone worked on it lately, and found any solution? Thanks in advance.

    Hi,
    use this FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'. and pass the required values.
    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'
    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'.
    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'
    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.
    Edited by: katigiri linganna on Jul 31, 2009 8:56 AM

  • How to send text-attachement in mail ?

    hi there,
    i have a workflow in which a user can attach a RAW-document to the task. there he puts in a text.
    now i want to put that text in an email in the next step of the workflow.
    but how can i manage to get the text in my emal ???
    reg, Martin

    <<<<<<<<<<<<<<
    yes, but HOW can i pass it on ? i still don't get that point
    anyway, the user wants to have all information in the email. why should he open
    a seperate document for just reading the comments ? thats kind of user-unfriendly.
    even if the user has to logon to sap. >>>>>>>>>>>>>>>>
    Actually you are unfirendly in requesting an answer.
    1) Anyways for reading each of the attachment there have to be a background job to read the content of the attachment and then either pass data into a table and then into the email step mail content.
    Or use the content and use mail send FM in SAP FM 'SO_NEW_DOCUMENT_SEND_API1'
    2) How to read each of the attachment content is below:
    To read all the attahchments in WI and to find the document id use FM SAP_WAPI_READ_CONTAINER
    Then Use FM - SO_DOCUMENT_READ_API1...... and Read the document content for the doc using doc id from previous FM
    U can get the exact content in the message and can use it accordingly
    Hope I was clear lem me knoww
    Thanks,
    Charan
    reg, Martin

  • Sending email attachements using unix !!

    hi
    I want to send report generated my spooled file as attachment using unix shell script.
    Can somebody help me out ?
    many thanks

    Nothing to do with PL/SQL.
    Anyway, here's a snippet from a Unix shell script I wrote that does notification (via various methods). The code snippet is from the part where an e-mail with attachment is created for the Unix mail command. The variable names are (I hope) self explanatory.
    <font color="blue">
    ConstructMail()
      # do we have an attachment and does the file exist?
      if  [ "$ATTACHMENT" != "" ] && [ ! -f $ATTACHMENT ]
      then
        Abort "Error. File [$ATTACHMENT] not found."
      fi
      # create the boundary tags for the attachment
      if [ "$ATTACHMENT" != "" ]
      then
        BASE=`basename ${ATTACHMENT}`
        BOUNDS1="-"`hostname`.`date +%y%m%d%H%M`.$$
        BOUNDS2="--"$BOUNDS1
      fi
      # now we construct a MIME e-mail that includes boundaries for e-mail
      # attachments
      echo "To: $EMAIL_RECIPIENT"                              >> $LETTER
      echo "Subject: $SUBJECT"                                    >> $LETTER
      echo "MIME-Version: 1.0"                                    >> $LETTER
      if  [ "$ATTACHMENT" = "" ]
      then
        echo "Content-Type: Text/plain; charset=US-ASCII"           >> $LETTER
      else
        echo "Content-Type: Multipart/Mixed; Boundary=\"$BOUNDS1\"" >> $LETTER
        echo ""                                                     >> $LETTER
        echo "$BOUNDS2"                                             >> $LETTER
        echo "Content-Type: Text/plain; charset=US-ASCII"           >> $LETTER
      fi
      # now let's add the message's text body
      if [ -f $LETTER_BODY ]
      then
        cat $LETTER_BODY                                            >> $LETTER
      else
        Abort "Error. Letter body [$LETTER_BODY] not found!"
      fi
      # if we have an attachment, let's add it now
      if  [ "$ATTACHMENT" != "" ]
      then
        echo "$BOUNDS2"                                                   >> $LETTER
        echo "Content-Type: Text/plain; charset=US-ASCII; name=\"$BASE\"" >> $LETTER
        cat ${ATTACHMENT}                                                 >> $LETTER
      fi
    </font>The only real complexity is creating the boundary tags between attachment and the mail body - and of course specifying the correct e-mail headers so that the mail reader will know what is what.
    The above code creates a $LETTER file and this is then simply e-mailed using the Unix mail command, e.g.
    /usr/bin/mail $RECIPIENT < $LETTER
    More details in RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. http://www.faqs.org/rfcs/rfc2045.html

  • Design: Downloading attachement using Mail adapter

    Hi Experts
    I am currently building an interface which requires attachment to be downloaded in XI box. Is this possible using sender mail adapter. Could someone validate the feasibility of the design.
    Requirement in Brief
    A bank is sending a file through e-mail as an attachment to a file system and XI has to move the file to target system using FTP adapter. Now we want automation on source end. Instead of manually downloading the file to file system we want file to be direcly posted to target system.
    So few questions with regard to requirement:
    1) Can I download the file from mail in XI and then post the downloded attachement to Target system.
    Could someone please provide me with the steps for downloading the file to XI??
    Regards
    Abhishek Mahajan

    Hey
    Please have a look at the following blog
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    Thanx
    Aamir

Maybe you are looking for