Email attachment content corrupted, Encoding Issue

Hi all, I have problem with corrupted email attachments.
I write JSP codes to send the html file I have created as an ATTACHMENT by using codes:
messageBodyPart = new MimeBodyPart();
FileDataSource fds = new FileDataSource(tempAttachment);
messageBodyPart.setDataHandler(new DataHandler(fds));
messageBodyPart.setFileName(filename);
multipart.addBodyPart(messageBodyPart);
I can successfully send out an email with attachment, however, the attachment when received by Outlook Express, Gmail, Thunderbird are fine without any corruption, but it was corrupted when received with my Outlook 2000. It is totally corrupted and cannot be converted even I change any encodings to view it. Please find below the corrupted text for your reference:
[email protected]& @{83;g@Z8i 1MGO 6G4B 1MGO@G ?)G` 0hH94c4g@Z0! ?9>`GR 6' A$H.GQ <:8m 9W ?y5eF\=: 9xH#8& >K7AAV=C1b 9Y6x4O4Y.
I found many resources to help people to do encoding for the mail subject and attachment file name, but coundn't find any for the encoding of the attachment content, many authors even suggest that the email client will do the job for attachment encoding conversion. But, Outlook 2000 sucks, I need to do it explicitly in the coding, would anyone of you help me?
Thanks a lot for your help and this is urgent, your help is highly appreciated.

Hey, where are the experts?Maybe the JavaMail experts view the JavaMail forum!
>
OMG, people in this forum only know how to get stuff
from the others and never thinking of sharing your
knowledge with the others?This is just stupid! If nobody is "sharing your knowledge" then how can others "get stuff"?
>
Or there are no experts in this forum???Plenty! Many have written well thought of books on various Java topics.
I am not an expert in JavaMail but I use JavaMail and have sent JavaMail with attachments to Outlook 2000 but I have never seen your problem. Don't you think it significant that all woks OK except on Outlook 2000! Maybe printing the raw email will help you decide what is wrong.
P.S. Consider moving the code that sends the email out fo the JSP to a class that can be tested outside the web server. Then if you have a problem you can post more than just a fragment.

Similar Messages

  • Mail attachement content trnsfer encoding 8bit , 7bit

    Good morning to everybody.
    I have a problem reading mail attachement.
    When the attachement is 8bit encoded the exadecimal char "3D" is write in a file as "0D". This is wrong
    When the attachement is 7bit encoded the exadecimal char "3D" is write in a file as "3D" . Thi is right
    Is there anyone who knows why of this beaviour?
    Many thanks

    I'm using the msgshow.java that is the example included in the java mail library.
    Attachement downloaded with JavaMail (the bad one):
    �� 3D ==> 0D (CR)
    2007-05-15;18.11.26;978;000469,00;380;Italy
    ;LUISA SPAGNOLI NAPOLI IT;34009575;8036527 ;5651;00;
    Attachement downloaded with outlook (the good one):
    �� 3D not translated
    2007-05-15;18.11.26;978;000469,00;380;Italy =
    ;LUISA SPAGNOLI NAPOLI IT;34009575;8036527 ;5651;00;
    Here the properties of the mail message:
    Microsoft Mail Internet Headers Version 2.0
    Received: from EXSMTP-IN2.sede.corp.sanpaoloimi.com ([10.244.7.21]) by EVS01.sede.corp.sanpaoloimi.com with Microsoft SMTPSVC(6.0.3790.2499);
         Mon, 28 May 2007 08:09:14 +0200
    Received: from secgw-b-e02.intesabci.it ([172.19.0.27]) by EXSMTP-IN2.sede.corp.sanpaoloimi.com with Microsoft SMTPSVC(6.0.3790.2499);
         Mon, 28 May 2007 08:09:13 +0200
    Received: MHUBINT
    Received: FW
    Received: from mail1.ssb.it ([192.106.129.13])
         by mailbox.intesabci.it with SMTP id l4S696n5006757
         for <[email protected]>; Mon, 28 May 2007 08:09:09 +0200
    Received: (qmail 11377 invoked by uid 509); 28 May 2007 06:02:04 -0000
    Received: from 127.0.0.1 by Imhotep (envelope-from <[email protected]>, uid 501) with qmail-scanner-2.01
    (spamassassin: 3.1.3.
    Clear:RC:1(127.0.0.1):.
    Processed in 0.078893 secs); 28 May 2007 06:02:04 -0000
         Mon, 28 May 2007 08:02:03 +0200 (CEST)
         (Postfix) with SMTP id 6798F34257;Mon, 28 May 2007 08:02:03 +0200 (CEST)
    to: <[email protected]>,
    from: <[email protected]>
    subject: 28 May 2007 08:00 PS12 FROD-ATM1
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="P=_NextPart_000_01BD3BAF.A762FD80"
    Date: Mon, 28 May 07 08:00:27 B
    Message-Id: <[email protected]>
    Return-Path: [email protected]
    X-OriginalArrivalTime: 28 May 2007 06:09:13.0674 (UTC) FILETIME=[B707A2A0:01C7A0EE]
    --P=_NextPart_000_01BD3BAF.A762FD80
    CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
    Content-Transfer-Encoding: 8bit
    --P=_NextPart_000_01BD3BAF.A762FD80
    Content-Type: text/plain; charset=us-ascii; name="SPIMI.TXT"
    Content-Disposition: attachment
    Content-Transfer-Encoding: quoted-printable
    X-MIME-Autoconverted: from 8bit to quoted-printable by mailbox.intesabci.it id l4S696n5006757
    --P=_NextPart_000_01BD3BAF.A762FD80
    CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
    Content-Transfer-Encoding: 8bit �������� I think the problem is here
    P=_NextPart_000_01BD3BAF.A762FD80

  • Email Prob - Content-Transfer-Encoding: base64

    Using APEX to send an email to a CA product. We are doing this successful with another source (not Apex). The email that is sent opens a Help Desk ticket in the CA tool.
    Another development tool has the this in the mime.822 file:
    Content-Transfer-Encoding: 8 bit
    The email send from APEX has Content-Transfer-Encoding: base64.
    The look of the emails are different, this is why it is not working correctly when sent from APEX.
    Does anyone know about base64 versus 8-bit?

    Steve,
    >> Yes, I am sure. This all being done inside our firewall and domain.
    For an e-mail message to get from point A to point B, it must go through some message transfer agent somewhere, regardless whether it's all within the same firewall, domain, or otherwise.
    >> Is there a work-around for this?
    There can only be a workaround when the definitive problem has been identified. That has not been done.
    I just sent myself a message from apex.oracle.com, which is running APEX 3.0.1. I examined the entire message source in Thunderbird. I found no occurrence of Content-Transfer-Encoding in my message whatsoever. Hence, I believe this is not APEX which is injecting this into your message.
    My suggestion - take a look at what your SMTP server settings are for your APEX instance. Ensure that you are routing your e-mail to the SMTP server which works from the other "source" which is done successfully.
    Joel

  • Email Integration Scenario - Issue with email body content

    Hi All,
    We have an Email to File Scenario. PI is connected to Outlook server using Sender Mail Channel using POP3. We are able to fetch and display emails correctly for most of the received emails.
    However we notice that for Email sent from few Mail server like Yahoo mail, Gmail, Hotmail, we are not getting the Email content correctly.
    Issue is happening with Emails sent in HTML/Rich text format (containing Formatting and without any attachments). In the receiver system we see the email is converted to Plain text format. If the same email is sent with some attachment / Embedded Image, we get all the Formatting correctly in Receiver System.
    A closer look at Pimon we found the following:
    1. When Email is sent with Formatting (without any attachment/ image) in Pimon we see that it creates 2 Payloads (screenshot attached)
    2. The First Payload - MainDocument contains the Email content in XML format, but is missing the Email formatting data in it.
    3. The other Payload - ([email protected]) contains the actual Formatted Email Content.
    Not sure why the formatting data is missing from MainDocument. Instead its coming in other payload. Due to this we are not able to display correct data at receiver end as we parse the MainDocument as our Input Payload Stream
    Note: We cannot use payload swap bean, as it will swap the data for all the incoming emails which we don't want.
    Anyone faced similar issue? Steps to get proper formatting data in MainDocument..
    Suggestions / Inputs will be highly appreciated.
    Thanks,
    Azhar

    Azhar,
    We cann't influence the behavior of Gmail, Hotmail. But have to get HTML as main payload, so we have to swap payload (not always, in some cases based on a condition). Please try below Java mapping. In Operational Mapping set "Read Attachments".
    package javaapplication1;
    import java.io.*;
    import com.sap.aii.mapping.api.*;
    import java.util.Collection;
    public class NewClass6 extends AbstractTransformation {
        @Override
        public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {
            try {
                InputStream inputstream = transformationInput.getInputPayload().getInputStream();
                OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();
                byte[] b = new byte[inputstream.available()];
                inputstream.read(b);
                //Loop over attachments and if attachment name starts with 'payload-' swap it with main payload. Edit below logic as needed.
                Collection<String> listAtt = transformationInput.getInputAttachments().getAllContentIds(true);
                for (String att : listAtt) {
                    if (att.startsWith("payload-")) {
                        b = transformationInput.getInputAttachments().getAttachment(att).getContent();
                outputstream.write(b);
            } catch (Exception exception) {
                getTrace().addDebugMessage(exception.getMessage());
                throw new StreamTransformationException(exception.toString());

  • Change content-disposition in email attachment

    I am using apex_mail (in Apex 4.1) to send emails with an attachment.
    v_mail_id := apex_mail.send(
             p_to  => '[email protected]'
             ...etc...
    apex_mail.add_attachment( p_mail_id    => v_mail_id
                             ,p_attachment => v_image
                             ,p_filename   => 'signature.jpg'
                             ,p_mime_type  => 'image/jpeg');
    Apex creates this as an attachment:
    Content-Disposition: attachment;
    I would like to change it to inline:
    Content-Disposition: inline;
    so I can reference it in my email body with <img src="cid:signature.jpg"/>. Well... I hope it is going to be shown inline anyway if I change Content-Disposition.
    Currently (with Content-Disposition: attachment;) it works for Outlook, but, for instance, not in Gmail in the browser. Gmail shows the image separately as an attachment.
    Is there a way to change the content-disposition with Apex?
    I know it is possible to do it with utl_mail, but this is currently not installed in our databases. I need to involve our DBA to set this up, and I don't know if he is willing to do that.

    Hi Joel,
    I thought so. I will put this in the Apex feature request database.
    Ino
    BTW, for other people it might be interesting to know that there is another option I tried that doesn't work in many situations either. You can put this in the email body:
    <img src="data:image/jpeg;base64,'||v_image_base64||'"/>
    where v_image_base64 is the base64 encoded jpg image.
    From my experiments the inline attachment with a cid reference seems to work best.

  • Five days ago I received an email from an anonymous sender with the subject: Your Apple ID was just used to buy full album Elton John 312.99. Your receipt No. 37930343160405752. the content began: Content-Transfer-Encoding: base64 From (my email add

    Five days ago I received an anonymous email with the subject:
    Your Apple ID was just used to buy full album Elton John £12.99.Your receipt No.37930343160405752
    The content started: Content-Transfer-Encoding: base64 From:(my email address) followed by a very,very,very long stream of gobbledygook. There is no record of it in my i-tunes purchases or my credit card statement but that might only be because I have not updated my credit card details. Should I be worried that my account has been compromised? Does anyone know how I can get through to the right section of Apple to deal with this - all the emails I get say no-reply so I don't have an email address to contact them on.
    I would be most grateful if anyone could help me with this.
    Thanks in advance
    Walwal

    It's a phishing attempt to try and get your account and payment details - forward it to Apple : [email protected] , and then delete it
    Phishing emails : Identifying fraudulent "phishing" email - Apple Support
    Genuine emails : Identifying legitimate emails from the iTunes Store - Apple Support

  • Encoding issue in email send from SAP

    Hi,
    I am currently having encoding issue in email send by SRM .
    Can some one help me ?
    My problem :
    When i key in my SC subject/desc through IE7 with encoding unicode (UHT-8). Everything look fine.
    After i order the SC, Email will be sending out to the approver.
    The email received by approver is including strange character.
    Example desciption i putting on SC : Testing Encoding from IE7
    Result : Email which received by approver : Testing Encoding from IE7Â.
    Can some one advice me on this?
    Thanks,
    Vanece

    Hello Vanece,
    >
    Vanece Hee wrote:
    > (...)
    > They look fine in BBP_PD as well.
    >
    > when i trace them in SOST, the word will be look weird.
    > (...)
    Problem could come from internal and external data format.
    Depending on your SRM release, check OSS notes for report you used to generate approval mail ( RSWUWFMLEC, RBBP_NOTIFICATION_APP, etc.).
    >
    Vanece Hee wrote:
    > (...)
    > When i change the encoding setting in outlook to unicode for the email, it work for some email only.
    > (...)
    Ask to your Outlook team to have a look at Outlook settings.
    You can also check OSS note 1319517 - Unicode Collection Note.
    Regards.
    Laurent.

  • Z10 encoding issue in outgoing email

    Hoping someone can help me. I've been an avid bb fan for years and my husband and I both handed in our bonds a week ago to move to the z10. We are both loving it. While my husband has had no issues with his I am very close to having no issues - except for one major one that affects me and my clients greatly. I have 2 email accounts - gmail (working without any issue at all - was up and running within a matter of minutes of receiving my z10). The other however has not been a fun or even manageable experience. My work email is web based and took a few days for me to even get it up and running. With my bold I was able to connect via Exchange but am no longer able to do so. I was told to connect via Active sync however my employer does not have this functionality and it is not supported. Following that I was told to connect using either IMAP or POP. And while I have been finally able to connect and receive my email when I SEND email it is a disaster!!!!! My out going mail seems to be adding in all of the encoding and so it becomes "unreadable" for lack of a better term. I have no idea where to turn on this. I have been constantly surfing and searching and and all forums that I can in hopes to find a resolution but have not yet found one - this is my last resort - otherwise sadly ....... Very, very sadly I will have to return my phone. Any suggestions at all would be much appreciated! Sorry for the "long-winded ness"

    lesedwards wrote:
    I agree. I run my own business in fact two business and I cannot be sending emails out from some half **bleep** address how professional does that look. Everything has worked perfect for 10 years and then I bought this piece of **bleep** called a Z10 and it even worked on it until the OS update.
    Wow lesedwards.. you are on fire. Jacking your issue into every email thread and getting **bleep**ed constantly.
    This thread was about an encoding issue, and from your other posts you are simply having connection issues.
    @Sarealex - I haven't seen this issue with any of my email accounts over IMAP, what software version are you currently using?
    -: DrewRead :-
    Can't find an app on Blackberry World yet? Tweet the developer and ask when they will #GetWithBB10 !!
    "Like it" if you like it.

  • Email body content is being sent as an attachment in workflow

    Dear all,
    In SBWP when i send mails recipents reciving mails as attachment but i need same as email body content.
    pls suggest me..
    Regards.
    Rahul.G

    In send mail task..how did you write the container values?

  • PDF attachment are corrupted via email.

    When I open a PDF attachment via my emails it's corrupted with different colors over the page and I can't read it. Opening the same document from my laptop has no problem. I have also had the attachment resent. My iPad never had this problem until recently.

    Skydiver119 makes a very good point. The built in PDF reader and the iBooks app will not read fillable form fields in a PDF, so you need a third party app for those types of PDF files. I use Adobe Reader for PDf files. It is free, it allows for annotation, you can create folders, highlighting, form fields, adding a signature, renaming, etc. It's a great app and certainly worth a look.

  • Send payload content as email attachment

    Hi all
    I have a field in the source structure, the content of this field/tag has to be sent as an email attachment.
    Appreciate your help in advance
    -Keerthi

    Hi,
    Try using a receiver mail adpater, you can send the payload data as attachment.
    http://help.sap.com/saphelp_tm60/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Thanks,
    Pragati

  • Getting encoded Email attachment!!!!

    Hi Frds,
    I am sending a notification through email. Its the same SendEmailWith Attachments example. The samplecover.pdf file is shown properly in email attachment , but when I wanna read .txt/.doc/.rtf file its showing some encoding.
    I am using mime type for the attachment as
    "string('text/html; charset=UTF-8'
    Any pointers so that I could get my email attachment show proper message instead of encoding. Thanks to all

    I don't see the function under Advanced Functions. I looked through all the other function lists and I still don't see doTranslateToNative() anywhere. When I try to use the function anyway, I get an error when I try to deploy the BPEL process. The error message says the function is not registered, make sure the function is registered in xpath-functions.xml file located under domain config directory and make sure that function prefix is mapped to correct namespace in <process> activity.
    I looked in the xpath-functions.xml file and I don't see any functions listed in there. I'm not sure why the error message says the function needs to be listed in this file because other xpath functions are available for use in the BPEL process and they aren't listed in the file.
    Is there another solution besides using doTranslateNative()?

  • Issue with excel email attachment after upgrade

    Hi ,
    We have recently upgraded from ECC 5.0 non-unicode to ECC 6.0 unicode version.
    An existing program converts the data in an internal table into HTML code and then sends this as an email attachment(XLS format) using the FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    Now if the mail attachment is sent from the non-unicode system , excel converts the HTML code and shows the data perfectly but when i open the mail attachment from the unicode system, the HTML code sits in a cell of the excel and therefore data is not visible.If i wish to see the data, i will have to cut the data from the cell and paste it .
    I anticipate that this is because of some issue with the unicode.
    Your inputs towards the issue resolution are highly appreciated.
    Thanks,
    Avanish Joshi

    I found the note 1151258 and as mentioned in it, i used the BCS class for sending excel attachments and it worked.
    My sincere apologies for not replying to those who posted queries to this question.
    Thanks.

  • Issue facing background email attachment.

    Actually I have a problem when I tried to send an email to user from program. This is urgent one. Can I have any suggestions or solutions for this problem from you guys? plz . I welcome to get it as soon as possible. Also I tried to explain as better as I am. If you have any questions or I am not clear , I will explain you for your questions.
    Let me explain the problem fully.
    1) I need to create a selection screen field  for user to enter the email id. - This is done
    2)If the user enter the email id and execute the report then I have to email the current output of the report to entered( from selection screen) email id as a text. - This is done
    3) Now the user needs the some choice to see the output in email. So he wants to add a check box in selection screen just below the "Email id" field in selection screen. So If the user enter the email id and execute the report without choosing the check box then he would able to see the report's output in the email as text.  otherwise the user tick the check box and enter the email id and execute the report then we need to send the report's output as a attachment in the email. So when the person( selection screen email id's owner) opens his email he would like to see the attachemnt then If he opens the attachement he would see the report's output now.
    This is the purpose the user needs the check box.  - This is done
    4) I use FM 'SO_NEW_DOCUMENT_ ATT_SEND_ API1'  to send the email as a text to selection screen's email id.  - This is done
    5) Also  I use FM 'SO_NEW_DOCUMENT_ ATT_SEND_ API1'  to send the email as a attachment to selection screen's email id. - This is done
    6) If the user wants to run this in background and send the email to selection screen's email id(without attachment), then I have to send the report's output to email id as a text. - This is done
    7) If the user wants to run this in background and send the email to selection screen's email id(with attachment), then I have to send the report's output to email id as a attachment. - This is not done still. This is partially done. I can able to see the attachment . But If I open the attachment I am seeing only last page of the report's output. I didn't see any other previous pages. If it only one page report then it is ok. But my requirement is more than one page. So I need to send  all pages to email as a attachment. I tried it many way. But I could not able to find the solution yet. But If I execute the report in foreground for attachment then I would able to see all the pages in attachment. But I have only problem in BACKGROUND.
    I added 2 attachments here. 1) the codes which send the email to email id as a text. 2) the codes which send the email to email id as a attachment.
    After look at the below attachment codes plz read this following line.
    Also when I used to send the email as a attachment, I used the "SAVE_LIST" FM to catch the current list from memory and compress it through the FM "COMPRESSED_ LIST" and send these internal table records to the EMAIL FM "'SO_NEW_DOCUMENT_ ATT_SEND_ API1". I have read the "SAVE_LIST" FMs documentation too. I have seen that this is not suitable for background emailing. So I think I need any other FMs used here instead of this particular FM or else I would expect any other solutions for this problem.
    1) *
      DATA: DOC_DATA     LIKE SODOCCHGI1,
            RECEIVERS    LIKE SOMLRECI1  OCCURS 0 WITH HEADER LINE,
            PACK  LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
            TXT   LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            CNT          TYPE I,
          TEXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,  
            TAB_LINES    LIKE SY-TABIX.
    Add all email id's from selection screen in the mailing list one by
    one
      LOOP AT M_EMAIL.
        RECEIVERS-RECEIVER = M_EMAIL-LOW.
        RECEIVERS-REC_TYPE = 'U'.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    there is no entry in the input then don't call the FM
      CHECK NOT RECEIVERS[] IS INITIAL.
      DO.
        CNT = SY-INDEX.
        READ LINE SY-INDEX.
        IF SY-SUBRC <> 0.  EXIT.  ENDIF.
        TEXT-LINE = SY-LISEL.
        APPEND TEXT.
        IF CNT > 5500.
          REFRESH TEXT.
          CLEAR TEXT.
          TEXT-LINE = 'Report too large for SAP.'.
          APPEND TEXT.
          EXIT.
        ENDIF.
      ENDDO.
      DOC_DATA-OBJ_DESCR = 'Report as a text'.
      DESCRIBE TABLE TEXT LINES TAB_LINES.
      DOC_DATA-DOC_SIZE = TAB_LINES * 255.
    Creation of the entry for the compressed document
      CLEAR PACK-TRANSF_BIN.
      PACK-HEAD_START = 1.
      PACK-HEAD_NUM = 0.
      PACK-BODY_START = 1.
      PACK-BODY_NUM = TAB_LINES.
      PACK-DOC_TYPE = 'RAW'.
      APPEND OBJPACK.
      CLEAR OBJPACK.
    object for showing the report's text
      OBJTXT = ' Report as a text'.
      APPEND TXT.
      CLEAR TXT.
    New FM to mail the user & directly to email id
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA = DOC_DATA
          PUT_IN_OUTBOX = 'X'
          COMMIT_WORK   = 'X'
        TABLES
          PACKING_LIST  = PACK
          OBJECT_HEADER = TXT
          CONTENTS_TXT  = TEXT
          RECEIVERS     = RECEIVERS.
      COMMIT WORK.
    2)
    Structures for recipient addresses
    Structures and internal tables for the send data
      DATA: pack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
      DATA: head LIKE solisti1 OCCURS 1 WITH HEADER LINE.
      DATA: bin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
      DATA: txt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
      DATA: doc_chng LIKE sodocchgi1.
      DATA: tab_lines LIKE sy-tabix.
      DATA: user_address LIKE sousradri1 OCCURS 1 WITH HEADER LINE.
      DATA: sent_to_all LIKE sonv-flag.
    clear listobject[].
    clear compress_list[].
      CALL FUNCTION 'SAVE_LIST'
           EXPORTING
                list_index         = sy-lsind
           TABLES
                listobject         = listobject
           EXCEPTIONS
                list_index_invalid = 1.
      IF sy-subrc = 1.
        WRITE: 'Error in save_list.'.
      ENDIF.
    It's always necessary to compress the list
      CALL FUNCTION 'TABLE_COMPRESS'
           TABLES
                in             = listobject
                out            = compress_list
           EXCEPTIONS
                compress_error = 1
                OTHERS         = 2.
      IF sy-subrc <> 0.
        WRITE: 'Error in table_compress.'.
      ENDIF.
    *move list to office table objbin
      MOVE compress_list[] TO bin[].
    Create the document which is to be sent
      doc_chng-obj_name = 'List'.
      doc_chng-obj_descr = 'Report list'.
      DESCRIBE TABLE txt LINES tab_lines.
      READ TABLE txt INDEX tab_lines.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( txt ).
    Fill the fields of the packing_list for the main document:
      CLEAR pack-transf_bin.
      pack-head_start = 1.
      pack-head_num = 0.
      pack-body_start = 1.
      pack-body_num = tab_lines.
      pack-doc_type = 'TXT'.
      APPEND pack.
    Create the attachment (the list itself)
      DESCRIBE TABLE bin LINES tab_lines.
    It is binary document
      MOVE compressed_list[] to bin[].
      pack-transf_bin = 'X'.
      pack-head_start = 1.
      pack-head_num = 0.
      pack-body_start = 1.
      pack-body_num = tab_lines.
      pack-doc_type = 'ALI'
      pack-obj_name = 'Attachment'.
      pack-obj_descr = 'Report for email attachment'.
      pack-doc_size = tab_lines * 255.
      APPEND pack.
    Add all email id's in the mailing list one by one
      LOOP AT M_EMAIL.
        RECLIST-RECEIVER = M_EMAIL-LOW.
        RECLIST-REC_TYPE = 'U'.
        APPEND RECLIST.
        CLEAR RECLIST.
      ENDLOOP.
      CHECK sy-subrc = 0.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = doc_chng
                put_in_outbox              = 'X'
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = sent_to_all
           TABLES
                packing_list               = pack
                object_header              = head
                contents_bin               = bin
                contents_txt               = txt
                receivers                  = reclist
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                operation_no_authorization = 4
                OTHERS                     = 99.

    Hi,
    If you are running thru background change the code like this way
      submit yXXXXXXXX exporting list to memory
               with p_docno = xdocno
               and return.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = report_list
        exceptions
          not_found  = 1
          others     = 2.
      loop at report_list.
        move report_;list to objtxt.
        append objtxt.
      endloop.
      objpack-doc_type = 'TXT'.
      describe table objtxt lines tab_lines.
      objpack-body_start = v_lines.
      objpack-body_num  = tab_lines.
      objpack-doc_size  = tab_lines * 255.
      objpack-obj_descr = w_docno_temp.
      append objpack.
      clear  objpack.
      doc_chng-obj_name  = w_docno.
      doc_chng-obj_descr = w_subject.
      reclist-receiver = to_smtp_addr.
      reclist-rec_type = 'U'.
      reclist-express  = 'X'.
      append reclist.
    aRs

  • Email Attachments Become Corrupted When Moved to a Different Mailbox

    I believe that I have stumbled upon a bug in Mountain Lion mail.  Here is the set up:
    Server:
    Mac OS X Mountain Lion Server 10.8.2 running IMAP email service
    Clients:
    An assortment of Macs all running Mac OS X Mountain Lion 10.8.2 using Mail as the mail client over IMAP.
    Issue:
    Ever since upgrading all company Macs to Mountain Lion we have recieved complaints from people that email attachments are occationaly becoming currupted once moved to other mailboxes such as the Trash or even other IMAP folders.  The symptom has not been observed to occur with other mail services such as gMail or iCloud but rather seems to be isolated to how Mountain Lion Mail handles moved emails with attachments on an IMAP service hosted on Mountain Lion server.  The issue also seems to be related to PDF attachments only.  We could not get the issue to reoccur with say a Pages document.  The issue also does not always occur but occurs about 90% of the time. 
    The email essentially goes from looking normal in the inbox to containing this text in it after it has been moved to another mailbox (obviously the real thing is like a hundred pages long):
    --Apple-Mail=_6C0E1272-08D2-7895-83FF-2F03EF82B31D
    Content-Disposition: inline;
              filename="example.pdf"
    Content-Type: application/pdf;
              x-unix-mode=0644;
              name="example.pdf"
    Content-Transfer-Encoding: base64
    JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRmlsdGVyIC9G
    bGF0ZURlY29kZSA+PgpzdHJlYW0KeAF1UttOwzAMfc9XnMcEaWmctkkr8cJlEncVCEjcHtAYEgjY
    mOCBv8dJ13YMUFXFso+P7WO/4xTvyJrpYjKdf3zev2DxxA5nKhj+bNW+k1dk+6+E3Rnjc4QFtgMo
    Ikx8qIT1uQiMCoE0OxAecQPZKIwslTq
    Now if that same email, now moved into a new mailbox, apearing corupted to the Mac Mail client, is viewed from say an iPhone or iPad, the attachment appears normal.  If a new Mac client is set up to read that email account that email also appears normal.  This would indicate that issue does not seem to be occuring server side but however seems related to a cashe issue with the Mail client. 
    Temporary Fix:
    Now this is not a good fix but deleting the entire /User/Library/Mail folder and forcing Mail to completely reconnect to the IMAP server and redownload all headers and attachements fixes the issue.  However this only fixes the emails that once appeard corrupted to the client.  Any new emails moved around will continue to get corupted.  Syncronizing the mailbox does nothing to rectify the issue.
    Plee for help:
    Obviosuly this is a serious issue and must be rectified.  We are using the most standard and Mac friendly/default set up possible (even a Mac server).  Has anyone expereinced this issue or want to venture a guess on how to fix it?  Does it seem like a bug in the Mail client to you?  Any ideas???
    I really apprecaite the help.
    -Christian

    Oh man! So they say "We know this is a bug and we can't fix it since Tiger" ????? This is Apple with an army of developers and they can't fix this annoying issue???? WHAT???? I think this is a not a day more problem to fix and their professional OS X Server is affected by this problem as well and they don't fix it... their own software... what a customer care!!!
    Anyway it sounds ******** and the solution is the same category... if you have only one mail in the mailbox and move to an other on a certain type of server it's getting corrupted, but the rebuild process works and when you move back it will be corrupted again! They should fix this but it looks like they will never fix it... it's a shame from a big company which sells premium products.
    So if you still in contact with an Apple technician and they're opened I can provide both of the server platform when the problem can be proofed. (one where the sync is ok and one where it isn't and only with one mail in it ) Please contact me and I can help!
    You can try other mail softwares and they can handle the imap protocol without major problems. I tried the following ones:
    - Postbox
    - Thunderbird
    - Sparrow
    - Mail Mate
    Both works very wall but any of them is so integrated as the mail app with osx. Unfortunately if you live in the apple ecosystem and own more than one mac computer you will stuck with the apple one with all of its bugs.
    ...since Tiger... I can't get over it...
    Sorry guys I getting angry when I hear this kind of stories...

Maybe you are looking for

  • Page appearance questions

    Hi, I would appreciate some tips in how to format pages in my application. Please refer to the "TestRequestSystem" application using the following credentials: workspace: worklabdemo username: helpme password: please http://apex.oracle.com/pls/otn/ M

  • How to upload and download in BLOB?

    I tried webutil but is not working properly according to my needs is there any other way to upload and download files in BLOB? If any body knows solution please tell me. Regards,

  • Cannot import Finalize movie into iMovie

    I have a Sony DCR-DVD103 and when I go to File>Import Movies I do see my Finalized DVD, but all the files including the Import button are grayed out. How can I import the Finalized movie into iMovie? Upon connecting the Video Camera to my MacBook Pro

  • Favorite Themes always go missing

    Hi there, I have iDVD 6.0.3 and I have created some favorite themes in my project. When I quit and fire up iDVD again, I get the message: MISSING THEMES: "At least one of the themes used by this project is missing on your system. The default theme "T

  • Crash after security update 2006-007

    safari is crashing when i visit feed://www.engadget.com/rss.xml after installing update. I've also noticed (unrelated) problems with flip4mac after update (and repairing permissions) anyone else seeing this? ===== Wednesday, November 29, 2006 7:34:07