Mail attachment .ics is transformed to .msg and lost content

Hello,
I've a little problem in sending a mail with attachment with SO_NEW_DOCUMENT_ATT_SEND_API1
The System is ECC6
I've made a little function to generate and send a mail with an ICS file attached (iCal, i send a meeting request)
My problem is when the mail is sent, the attachment seems to be changed, i send Meeting.ics and i receive Untitled.msg empty
The problem is the same if i use my business workplace to send the mail with the same ICS attachment, i receive untitled.msg empty
I was wondering if SAP have to know the file type, so i've tried with a file with .xyz extension.... all works perfectly, so no, SAP does't have to
Here is the code for information
the code is configured to send an xyz file that works perfectly for me, i need the same with .ics (even if i begin to think that is a basis/exchange problem)
Maybe somebody can confirm this
Sorry for indent, i didn't found how to put this cleanly
  DATA: tab_lines LIKE sy-tabix.
* Variables for EMAIL functionality
  DATA: maildata   LIKE sodocchgi1.
  DATA: mailpack   LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
  DATA: mailhead   LIKE solisti1 OCCURS 1 WITH HEADER LINE.
  DATA: mailbin    LIKE solisti1 OCCURS 10 WITH HEADER LINE.
  DATA: mailtxt    LIKE solisti1 OCCURS 10 WITH HEADER LINE.
  DATA: mailrec    LIKE somlrec90 OCCURS 0  WITH HEADER LINE.
  DATA: solisti1   LIKE solisti1 OCCURS 0 WITH HEADER LINE.
*                            START PROGRAM                             *
*Clear all internal data
  CLEAR:    maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
  REFRESH:  mailtxt, mailbin, mailpack, mailhead, mailrec.
  CLEAR:    mailpack, mailbin, mailhead.
  REFRESH:  mailpack, mailbin, mailhead.
* Mail Subject
  maildata-obj_descr = subject_mail.
* Mail text
  LOOP AT body_mail.
    concatenate mailtxt-line body_mail-line CL_ABAP_CHAR_UTILITIES=>CR_LF into mailtxt-line.
  ENDLOOP.
  APPEND mailtxt.
* Prepare Packing List
  DESCRIBE TABLE mailtxt LINES tab_lines.
  READ TABLE mailtxt INDEX tab_lines.
  maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
* Creation of the entry for the text document
  CLEAR mailpack-transf_bin.
  mailpack-head_start = 1.
  mailpack-head_num = 0.
  mailpack-body_start = 1.
  mailpack-body_num = tab_lines.
  mailpack-doc_type = 'RAW'.
  APPEND mailpack.
*Creation of the attachement PDF
* Move OTF code to structure SOLI form email
  CLEAR solisti1. REFRESH solisti1.
  concatenate 'BEGIN:VCALENDAR' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'BEGIN:VEVENT' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'DTSTART:' begda 'T' begtime CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'DTEND:' endda 'T' endtime CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'SUMMARY:' SUBJECT_RV CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'LOCATION:' location_RV CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'STATUS:' 'CONFIRMED' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'DESCRIPTION:' into solisti1-line.
  loop at body_rv.
    concatenate solisti1-line body_rv-line '\n' into solisti1-line.
  endloop.
  concatenate solisti1-line CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'END:VEVENT' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  concatenate solisti1-line 'END:VCALENDAR' CL_ABAP_CHAR_UTILITIES=>CR_LF into solisti1-line.
  APPEND solisti1.
*Send OTF code to mail structure
  LOOP AT solisti1.
    MOVE-CORRESPONDING solisti1 TO mailtxt.
    APPEND mailtxt.
  ENDLOOP.
*Set status of the attachement
  DESCRIBE TABLE mailtxt LINES tab_lines.
  mailhead = 'ATTACHMENT'.
  APPEND mailhead.
** Creation of the entry for the compressed attachment
  CLEAR mailpack-transf_bin.
  mailpack-head_start = 2.
  mailpack-head_num = 1.
  mailpack-body_start = 2.
  mailpack-body_num = tab_lines.
  mailpack-doc_type = 'XYZ'.
  mailpack-obj_name = 'ATTACHMENT'.
  mailpack-obj_descr = 'Meeting.xyz'.
  mailpack-doc_size = tab_lines * 255.
  APPEND mailpack.
* Set recipient - email address
  mailrec-receiver = to.
  mailrec-rec_type  = 'U'.
  APPEND mailrec.
* Sending the document
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = maildata
      put_in_outbox              = 'X'
      commit_work                = 'X'
    TABLES
      packing_list               = mailpack
      object_header              = mailhead
      contents_bin               = mailbin
      contents_txt               = mailtxt
      receivers                  = mailrec
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      operation_no_authorization = 4
      OTHERS                     = 99.
*Check Return code for each receiver
  IF sy-subrc = 0.
    LOOP AT mailrec.
      WRITE :/ mailrec-receiver, mailrec-retrn_code.
    ENDLOOP.
  ENDIF.
*If needed, uncomment this to launch SOST queue
*Normally, this is automatic
*  IF sy-subrc = 0.
*    SUBMIT rsconn01
*            WITH mode = 'INT'
*            WITH output = ' '
*    AND RETURN.
*  ENDIF.
ENDFUNCTION.
Thanks in advance
Antoine

hi ;
this is sample for mail and PDF attachment ; U can use tihs algoritym
  FORM MAIL_GONDER .
* Internal Table
  DATA: I_OTF TYPE TABLE OF ITCOO INITIAL SIZE 0,
  I_TLINE TYPE TABLE OF TLINE,
  I_RECEIVERS TYPE TABLE OF SOMLRECI1,
  I_RECORD TYPE TABLE OF SOLISTI1 INITIAL SIZE 0 ,
* structures
  S_TLINE TYPE TLINE,
  S_RECORD TYPE SOLISTI1,
  S_OBJTXT TYPE SOLISTI1,
  S_OBJPACK TYPE SOPCKLSTI1,
  S_RECLIST TYPE SOMLRECI1,
* Objects to send mail.
  I_OBJPACK TYPE TABLE OF SOPCKLSTI1 INITIAL SIZE 0,
  I_OBJTXT TYPE TABLE OF SOLISTI1 INITIAL SIZE 0,
  I_OBJBIN TYPE TABLE OF SOLISTI1 INITIAL SIZE 0,
  I_RECLIST TYPE TABLE OF SOMLRECI1 INITIAL SIZE 0,
* Work Area declarations
  WA_OBJHEAD TYPE SOLI_TAB,
  W_CTRLOP TYPE SSFCTRLOP,
  W_COMPOP TYPE SSFCOMPOP,
  W_RETURN TYPE SSFCRESCL,
  WA_DOC_CHNG TYPE SODOCCHGI1,
  W_DATA TYPE SODOCCHGI1,
  WA_BUFFER TYPE STRING,
  "To convert from 132 to 255
* Variables declarations
  V_FORM_NAME TYPE RS38L_FNAM,
  V_LEN_IN TYPE SOOD-OBJLEN,
  V_LEN_OUT TYPE SOOD-OBJLEN,
  V_LEN_OUTN TYPE I,
  V_LINES_TXT TYPE I,
  V_LINES_BIN TYPE I.
  IF S_RECS IS INITIAL.
MESSAGE 'BELGEYu0130 MAu0130LE EKLEMEK u0130STu0130YORSANIZ ALICI ADRESu0130 Gu0130RMELu0130Su0130Nu0130Z'
    TYPE 'I'.
    RETURN.
  ENDIF.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      FORMNAME           = LV_SMART_NAME
    IMPORTING
      FM_NAME            = V_FORM_NAME
    EXCEPTIONS
      NO_FORM            = 1
      NO_FUNCTION_MODULE = 2
      OTHERS             = 3.
  W_CTRLOP-GETOTF = 'X'.
  W_CTRLOP-NO_DIALOG = 'X'.
  W_COMPOP-TDNOPREV = 'X'.
  IF MOD EQ 'SATISF'.
    CLEAR: GT_LIPS[].
    CALL FUNCTION V_FORM_NAME
      EXPORTING
        CONTROL_PARAMETERS = W_CTRLOP
        OUTPUT_OPTIONS     = W_COMPOP
        USER_SETTINGS      = 'X'
        TOPLAM_VBRP_NTGEW  = TOPLAM_VBRP_NTGEW
        TOPLAM_KDV         = TOPLAM_KDV
        GT_VBRK            = GT_VBRK[]
        GT_VBRP            = GT_VBRP[]
        GT_LIPS            = GT_LIPS[]
        TOPLAMNET          = TOPLAMNET
        BRUTNET            = BRUTNET
      IMPORTING
        JOB_OUTPUT_INFO    = W_RETURN
      TABLES
        GT_KNA             = GT_KNA1[]
        GT_KONV            = GT_KONV[]
        GT_KONVKDV         = GT_KONVKDV[]
      EXCEPTIONS
        FORMATTING_ERROR   = 1
        INTERNAL_ERROR     = 2
        SEND_ERROR         = 3
        USER_CANCELED      = 4
        OTHERS             = 5.
  ELSEIF MOD EQ 'SATISIH'.
    CLEAR:GT_LIPS[].
    CALL FUNCTION V_FORM_NAME
      EXPORTING
        CONTROL_PARAMETERS = W_CTRLOP
        OUTPUT_OPTIONS     = W_COMPOP
        USER_SETTINGS      = 'X'
        TOPLAM_VBRP_NTGEW  = TOPLAM_VBRP_NTGEW
        TOPLAM_KDV         = TOPLAM_KDV
        GT_VBRK            = GT_VBRK[]
        GT_VBRP            = GT_VBRP[]
        GT_LIPS            = GT_LIPS[]
        TOPLAMNET          = TOPLAMNET
        BRUTNET            = BRUTNET
      IMPORTING
        JOB_OUTPUT_INFO    = W_RETURN
      TABLES
        GT_KNA             = GT_KNA1[]
        GT_KONV            = GT_KONV[]
        GT_KONVKDV         = GT_KONVKDV[]
      EXCEPTIONS
        FORMATTING_ERROR   = 1
        INTERNAL_ERROR     = 2
        SEND_ERROR         = 3
        USER_CANCELED      = 4
        OTHERS             = 5.
  ELSEIF MOD EQ 'HURDA'.
    CALL FUNCTION V_FORM_NAME
      EXPORTING
        CONTROL_PARAMETERS = W_CTRLOP
        OUTPUT_OPTIONS     = W_COMPOP
        USER_SETTINGS      = 'X'
        SOFOR              = P_SOFOR
        PLAKA              = P_PLAKA
        TOPLAMTUTAR        = TOP_KALEM_TUTARI
        ISKONTO            = GV_ISKONTO
        KDV                = GV_KDV
        NETTOPLAM          = GV_NETTOPLAM
        NET                = GV_TOPLAM
        KUNNR              = GV_KUNNR
        IHRACATMI          = OPSIYON
      IMPORTING
        JOB_OUTPUT_INFO    = W_RETURN
      TABLES
        GT_BKPF            = GT_BKPF[]
        GT_BSEG            = GT_BSEG[]
      EXCEPTIONS
        FORMATTING_ERROR   = 1
        INTERNAL_ERROR     = 2
        SEND_ERROR         = 3
        USER_CANCELED      = 4
        OTHERS             = 5.
  ELSEIF MOD EQ 'SEVK'.
    DATA: LS_DLV_DELNOTE        TYPE LEDLV_DELNOTE.
    DATA: TESLIMAT LIKE NAST-OBJKY.
    MOVE P_TESLIM TO TESLIMAT .
    CALL FUNCTION V_FORM_NAME
    EXPORTING
        CONTROL_PARAMETERS = W_CTRLOP
        OUTPUT_OPTIONS     = W_COMPOP
        USER_SETTINGS      = 'X'
        IS_DLV_DELNOTE       = LS_DLV_DELNOTE
        IS_NAST              = NAST
        TESLIMATNO           = TESLIMAT
   IMPORTING
        JOB_OUTPUT_INFO    = W_RETURN
   EXCEPTIONS
       FORMATTING_ERROR     = 1
       INTERNAL_ERROR       = 2
       SEND_ERROR           = 3
       USER_CANCELED        = 4
       OTHERS               = 5.
  ENDIF.
  I_OTF[] = W_RETURN-OTFDATA[].
  CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      FORMAT                = 'PDF'
      MAX_LINEWIDTH         = 132
    IMPORTING
      BIN_FILESIZE          = V_LEN_IN
    TABLES
      OTF                   = I_OTF
      LINES                 = I_TLINE
    EXCEPTIONS
      ERR_MAX_LINEWIDTH     = 1
      ERR_FORMAT            = 2
      ERR_CONV_NOT_POSSIBLE = 3
      OTHERS                = 4.
  LOOP AT I_TLINE INTO S_TLINE.
    TRANSLATE S_TLINE USING '~'.
    CONCATENATE WA_BUFFER S_TLINE INTO WA_BUFFER.
  ENDLOOP.
  TRANSLATE WA_BUFFER USING '~'.
  DO.
    S_RECORD = WA_BUFFER.
    APPEND S_RECORD TO I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
* Attachment
  REFRESH: I_RECLIST,
  I_OBJTXT,
  I_OBJBIN,
  I_OBJPACK.
  CLEAR WA_OBJHEAD.
  I_OBJBIN[] = I_RECORD[].
* Mesaj gövdesi ve attachment oluu015Ftur.
  S_OBJTXT = 'FORM SÜNGER OTOMATu0130K BELGE MAu0130Lu0130'.
  APPEND S_OBJTXT TO I_OBJTXT.
  DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
  READ TABLE I_OBJTXT INDEX V_LINES_TXT TRANSPORTING NO FIELDS.
  WA_DOC_CHNG-OBJ_NAME = 'smartform'.
  WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
  WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
  WA_DOC_CHNG-SENSITIVTY = 'F'.
  WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
* Main Text
  CLEAR S_OBJPACK-TRANSF_BIN.
  S_OBJPACK-HEAD_START = 1.
  S_OBJPACK-HEAD_NUM = 0.
  S_OBJPACK-BODY_START = 1.
  S_OBJPACK-BODY_NUM = V_LINES_TXT.
  S_OBJPACK-DOC_TYPE = 'RAW'.
  APPEND S_OBJPACK TO I_OBJPACK.
* Attachment (pdf-Attachment)
  S_OBJPACK-TRANSF_BIN = 'X'.
  S_OBJPACK-HEAD_START = 1.
  S_OBJPACK-HEAD_NUM = 0.
  S_OBJPACK-BODY_START = 1.
  DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
  READ TABLE I_OBJBIN INDEX V_LINES_BIN TRANSPORTING NO FIELDS.
  S_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
  S_OBJPACK-BODY_NUM = V_LINES_BIN.
  S_OBJPACK-DOC_TYPE = 'PDF'.
  S_OBJPACK-OBJ_NAME = 'EK'.
  S_OBJPACK-OBJ_DESCR = 'BELGE'.
  APPEND S_OBJPACK TO I_OBJPACK.
  CLEAR: S_RECLIST, I_RECLIST.
  LOOP AT S_RECS.
    S_RECLIST-RECEIVER = S_RECS-LOW.
    S_RECLIST-REC_TYPE = 'U'.
    APPEND  S_RECLIST TO I_RECLIST.
  ENDLOOP.
  "APPEND LINES OF ALICILAR TO I_RECLIST.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      DOCUMENT_DATA              = WA_DOC_CHNG
      PUT_IN_OUTBOX              = 'X'
      COMMIT_WORK                = 'X'
    TABLES
      PACKING_LIST               = I_OBJPACK
      OBJECT_HEADER              = WA_OBJHEAD
      CONTENTS_BIN               = I_OBJBIN
      CONTENTS_TXT               = I_OBJTXT
      RECEIVERS                  = I_RECLIST
    EXCEPTIONS
      TOO_MANY_RECEIVERS         = 1
      DOCUMENT_NOT_SENT          = 2
      DOCUMENT_TYPE_NOT_EXIST    = 3
      OPERATION_NO_AUTHORIZATION = 4
      PARAMETER_ERROR            = 5
      X_ERROR                    = 6
      ENQUEUE_ERROR              = 7
      OTHERS                     = 8.
  WRITE:/ 'Mail Servera u0130letildi'.
ENDFORM.                    " MAIL_GONDER 

Similar Messages

  • Mail app displays No Subject, No Sender and No content in All Inboxes

    On my iPad 2 in the mail app, when looking at mail in All Inboxes my iCloud emails display with No Sender, No Subject, and No Content. If I tap on it there is "nothing to display". If I go to the iCloud inbox everything displays fine. I have multiple inboxes which include an exchange, gmail and xfinity accounts. The emails from these accounts all display fine in the All Inbox view. The Exchange is my primary work account and the iCloud is my primary home accoun tso viewing both is convenient.
    So far I have tried powering the iPad off and on. Shut the iCloud mail off and back on. Neither has worked. All messages display fine on my iPhone.
    Any suggestions?
    Thanks...Lenny

    Quit the mail app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Or ....
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I moved files and lost content, not just links-HELP?

    I have an indesign book and chapter files. I have been backing up (I thought) by copying the folder that contains all of these (chapters and book). When I moved the backup folders of old versions of the book, then tryied to open my current version, I have only text boxes. No placed images, no links to missing images.
    HELP?

    The .indb file is a collection of pointers to the individual documents, and any copies you make continue to point to the original locations, and those files continue to point to the original links. If you want to make a backup, use the Package command to make copies of everything and change the link and pointer locations.

  • Lost DVD SP4 Content Disk and lost Content

    My brother was some how fooling around with my mac pro, and deleted the dvd studio content and emptied the trash....When i went to reload it unfortuantely we found I had lost the content disk...I h ave a friend with the non universal version of the program....my question is this:
    Is it possible to load the non universal content onto my hard drive even though i'm using an intel based machine and have the universal version of FCP? thanks!

    Y

  • If I make a copy of an e-mailed attachment , where does it go and how do I access it?

    If I make a copy of an e-mailed attachment document, where does it go and how do I access it?

    i actually got it figured out. I have multiple email accounts i have to use due to different corporate offices ( which can be a real headache at times). The exchange account is an active server used by Hilton and its an actual account. What was happening is my mail was getting kicked back to their server for storage. Once I contacted Hilton, they corrected it on their end. Thanks for trying to help out.

  • How do I get a PDF document put into an attachment form that I can drag to an e-mail.  Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the

    How do I get a PDF document put into an attachment form that I can drag to an e-mail.  Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the e-mail.  What have I done differently?

    Thanks again for the detailed instructions Srini!
    And I really hate to be a pest . . . but . . .
    Using your example and not modifying it, I get the e-mail form filled out correctly and the pdf attached, however, I'm not prompted to sign it.
    Any more clues?

  • Java Mapping: payload as mail attachment and dynamic file name .

    Hi,
    I have written this piece of java code.
    The code includes XPATH for fetching dynamic filename and the copysource( in, out ) to copy the content of payload as mail attchment.
    The code seems to work fine, when either of the functionality is implemented.
    but when both are implemented together ie parsing for xpath then again parsing to copy payload, then it doesnt executes the latter path i.e the payload is not fetched in the attachment.
    public class MailPackage implements StreamTransformation {
      public void setParameter(Map map) {
      public void execute(InputStream in, OutputStream out)
              throws StreamTransformationException {
      String mailSubject = "test mail";
      String mailSender = "aaaaaaaa";
      String mailReceiver = "[email protected]";
      String attachmentName = null;
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = null;
      factory.setNamespaceAware(false);
    factory.setValidating(false);
         try {
              builder = factory.newDocumentBuilder();
         Document doc = null;
          doc = builder.parse(in);
              String XPATH ="/*/Invoice/InvoiceHeader/InvoiceNumber/text()";
              Node fieldValueNode = org.apache.xpath.XPathAPI.selectSingleNode(doc,XPATH);
              System.out.print(fieldValueNode);
              attachmentName = fieldValueNode.getNodeValue() +".xml";
      String boundary = "--";
      String mailContent = "This is a sample file";
      String CRLF = "\r\n";
        //     create XML structure of mail package
        String output ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
               + "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
               + "<Subject>" + mailSubject     + "</Subject>"
               + "<From>" + mailSender     + "</From>"
               + "<To>" + mailReceiver     + "</To>"
               + "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
               + "<Content>";
        out.write(output.getBytes());
        // create the declaration of the MIME parts
        //First part
        output = "--" + boundary + CRLF
               + "Content-Type: text/plain; charset=UTF-8" + CRLF
               + "Content-Disposition: inline" + CRLF + CRLF
               + mailContent + CRLF
        //Second part
        + "--" + boundary + CRLF
        + "Content-Type: application/xml; name=" + attachmentName + CRLF
        + "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
        out.write(output.getBytes());
        //Source is taken as attachment
        copySource(in, out);
        out.write("</Content></ns:Mail>".getBytes());
      } catch (Exception ie) {
        throw new StreamTransformationException(ie.getMessage());
    protected static void copySource(InputStream in, OutputStream out)throws IOException {
        byte[] bbuf = new byte[in.available()];
        int bblen = in.read(bbuf);
       if (!(bblen < 0)) {
          String sbuf = new String(bbuf);
           //replace all control characters with escape sequences
         sbuf = sbuf.replaceAll("&", "&amp;");
         sbuf = sbuf.replaceAll("\"", "&quot;");
         sbuf = sbuf.replaceAll("'", "&apos;");
        sbuf = sbuf.replaceAll("<", "&lt;");
        sbuf = sbuf.replaceAll(">", "&gt;");
        out.write(sbuf.getBytes());
    Povide your suggestions.

    Hi,
    This is the sample o/p that I get by opening the mail attachment using notepad.
    <?xml version="1.0" encoding="UTF-8"?>
    <InvoiceTransmission><InvoiceTransmissionHeader><InvoiceCreationDate>2008-12-03T00:00:00</InvoiceCreationDate><Version>2.0.2</Version></InvoiceTransmissionHeader><Invoice><InvoiceHeader><CustomerEntityID>LH</CustomerEntityID><IssuingEntityID>009140559</IssuingEntityID><InvoiceNumber>913353669</InvoiceNumber><InvoiceIssueDate>2008-12-03</InvoiceIssueDate><InvoiceType InvoiceTransactionType="OR">INV</InvoiceType><InvoiceDeliveryLocation>aaa</InvoiceDeliveryLocation><TaxInvoiceNumber>Not Applicable</TaxInvoiceNumber><InvoiceCurrencyCode>USD</InvoiceCurrencyCode><InvoiceTotalAmount>517174.63</InvoiceTotalAmount><InvoiceIDDetails InvoiceIDType="BT"><InvoiceIDVATRegistrationNumber>0000000000</InvoiceIDVATRegistrationNumber><InvoiceIDName1>aaaaaaaaaaaaaaa</InvoiceIDName1><InvoiceIDName2>bbbbbbHKG</InvoiceIDName2><InvoiceIDCity>ccccccccc ccccc</InvoiceIDCity><InvoiceIDCountryCode>HK</InvoiceIDCountryCode></InvoiceIDDetails><InvoiceIDDetails InvoiceIDType="II"><InvoiceIDVATRegistrationNumber>0000000000</InvoiceIDVATRegistrationNumber><InvoiceIDName1>eeeeeeee</InvoiceIDName1><InvoiceIDName2>PAY BY WIRE TRANSFER</InvoiceIDName2><InvoiceIDCity>fffffffffffffff, NA</InvoiceIDCity><InvoiceIDCustomField ID="1"><InvoiceIDCustomFieldDescription>Company Registration Number</InvoiceIDCustomFieldDescription><InvoiceIDCustomFieldValue>0000000000</InvoiceIDCustomFieldValue></InvoiceIDCustomField></InvoiceIDDetails></InvoiceHeader><SubInvoiceHeader><InvoiceLine><ItemNumber>001</ItemNumber><ItemQuantity><ItemQuantityType>IN</ItemQuantityType><ItemQuantityFlag>GR</ItemQuantityFlag><ItemQuantityQty>28134.000</ItemQuantityQty><ItemQuantityUOM>USG</ItemQuantityUOM></ItemQuantity><ItemQuantity><ItemQuantityType>DL</ItemQuantityType><ItemQuantityFlag>GR</ItemQuantityFlag><ItemQuantityQty>106498.775</ItemQuantityQty><ItemQuantityUOM>LT</ItemQuantityUOM></ItemQuantity><ItemDeliveryReferenceValue ItemDeliveryReferenceType="DTN">590365</ItemDeliveryReferenceValue><ItemDeliveryReferenceValue ItemDeliveryReferenceType="!
    ARN">DAL
    CH</ItemDeliveryReferenceValue><ItemDeliveryReferenceValue ItemDeliveryReferenceType="FNO">mmmmmmmmm</ItemDeliveryReferenceValue><ItemDeliveryLocation>pppp</ItemDeliveryLocation><ItemReferenceLocalDate
    If you notice the problem is, the undesired "exclamation mark" that gets added in some fields before the actual value.
    In the above case.. look at "ItemDeliveryReferenceType="! ARN">DAL"
    the exclamation mark before value "ARN is unwanted, which leads to improper XML formation.
    Cant figure out why is this coming.
    Regards,
    Faria Mithani

  • I have a jpeg signature for a signature in Mail account. When I attach another file to the email and se nd it to a Windows -operated recipient, my signature becomes an attachment as well and only the body of the email message is left.

    I have a jpeg I have added for a profeesional look to my signature in my Mail acount. When I attach other files to the message and send the message to a Widows-user recipient, the signature is no no seen as a signature and simply becomes an attachment with the email.
    What can I do to stop this happening. Thanks

    File menu "Attach Files..." then Tick off "Windows-friendly Attachment".

  • Sending a document as an mail attachment with approve and reject button

    Hi all,
         i have an infopath form where a user fills the form and on submit the form is saving as an document in the document library,
    now my question is, how can i get this document as an mail attachment with approve and reject option.

    Hello,
    You need to hide them on form load for user. Add one more hidden control in form and keep control value blank initially. Now add rule on button submit to set the control value to some other so you can hide/show the button.
    Now add rule on approve and reject buttons that, if field1 is blank then hide this control.
    http://office.microsoft.com/en-in/infopath-help/add-formatting-rules-HA101783371.aspx
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Mail attachment drag and drop issue

    Been facing serious mail attachment drag-and-drop issue since 10.8 (if not from 10.7) and was disappointed to find the same behaviour still in 10.9.
    When I drag and drop a picture file (from Finder for example) into a message window or onto the Mail.app Dock icon, the system's window management somehow gets confused: my next step is to click on the message window in order to start typing. However, the mouse click causes that very window to escape under all other open applications / windows. Further on, I dig under to find the escapee and click again: once more it escapes. This can go on for a few annoying rounds until gets solved in an unexplainable way. This behaviour in not consistent, but has happens in about 8 cases out of 10.
    Apart from Mail.app I do not experience drag and drop issues of any kind.
    Anyone else suffering from this?

    I'd be interested in the answer to this too.
    It only just started happening to me a day or so ago, about the time that I think I did an OS upgrade.
    I'm on OSX 10.8.2.
    Its annoying.
    I can drop and drag in Finder but it just affects email.

  • My computer is running slow after Yosemite install -but in the Mail program, when I open an email and then open the attachment -all is good -when I close the attachment the Mail program goes away, and I have to reopen it in my Dock -every time -been

    My computer is running slow after Yosemite install -but in the Mail program, when I open an email and then open the attachment -all is good -when I close the attachment the Mail program goes away, and I have to reopen it in my Dock -every time.

    I tried this, but no luck. I went to Previous System>Users. There is nothing inside the "Users" folder, so I hit a dead end.
    I can find my new e-mails -- those that came in since I re-installed the system -- in my NEW system (which I did to see if I was correctly understanding the advice), by going to Users>Home>Library>Mail>POP account name>Inbox.
    Let me add a new question: I am running PhotoShop C3. It opens OK, and I can use it, but when it opens I get this message: "One or more files for Adobe Application Support folder are missing. Please re-run the PhotoShop installer."
    I don't like re-installing working programs if I can avoid it, because it always seems to lead to other issues. Any idea what files are missing, and where it/they might be in the Previous System folder?
    thanks
    Mike

  • My e-mail attachment in xls format appears on PC's as infected and I'm unable to open it. What can I do?, My e-mail attachment in xls format appears on PC's as infected and I'm unable to open it. What can I do?

    My e-mail attachment in xls format appears on PC's as infected and I'm unable to open it. What can I do?, My e-mail attachment in xls format appears on PC's as infected and I'm unable to open it. What can I do?

    What does it have to do in iPad forum?

  • I installed 6.1.3 and lost all important sounds, phone ringer, mail, and text msgs.

    I installed 6.1.3 and lost all important sounds, phone ringer, mail, and text msgs.

    and all sounds , aplication's sounds , music, every thing

  • My mail 3.6 (Mac OSX 10.5.8) lost its 'trash' folder and won't let me delete msgs.

    My mail 3.6 (Mac OSX 10.5.8) lost its 'trash' folder and won't let me delete msgs.

    Good news, thanks!

  • Mac and photo E-mail attachment

    When I try to send a photo as an E-mail attachment using PSE 11 on my Mac it shows up in the recipients mail as an embedded photo rather then an attachment. Anybody else have this problem or a solution. Thanks

    You are very smart Barbara. If I use PSE11 and share a photo as an attachment with an AOL recipient and a Yahoo recipient the AOL recipient gets only and embedded picure in the E-mail whereas the Yahoo recipient gets an embedded image and the attachment. If I don't use PSE and go direct to my mail server and attach the photo and send to the aol person it works fine and they get it as a attachment. So it seems to me that PSE is not zipping and my mail server is and AOL accepts only zipped. I am assuming zipped and compressed mean the same thing. Is my interpretation of what is happening correct? Thanks much.

Maybe you are looking for

  • Deleted iPhoto and now I can't reinstall it -I'm using a second hand iMac so not using the Apple ID used to register it

    I had trouble updating iPhoto so I uninstalled it but now I can't reinstall it. I'm using a second hand iMac so I'm not using the Apple ID that was used to first register it. When I go to the App Store and try to download iPhoto it just says (accept)

  • Strange behavior from this forum?

    Hello all, did anybody ever experience this? I subscribes to a post because I wanted to see people's responses. I have now received three messages telling me that there are new posts on that entry. When I go to the post there ain't any. The other wei

  • Using JSlider as table component

    Ive been having some problems using JSlider in tables... Ive written several cell editors and renderers but this is the only one that gives me problems. Here is simplified code that i think should work but doesn't: import javax.swing.JFrame; import j

  • JEditorPane and HTML

    I have this html file on my C drive and I want to display it in a JEditorPane. THe problem is that I always get this malformed URL exception. I've done this before, but right now I can't seem to figure out whats happening. Any help as to the syntax a

  • .pdf attachment problems

    I have been having problems with my mail reversing the colors of any pdf attachments I get. It is just the preview of the pdf. If I open it in acrobat I can read it just fine. Any idea what setting in my mail would effect this?