Mail with PDF attachments sent, not stored in Sent

IMAP account, Sent folder configured to point to server's sent mail folder. "Windows friendly attachments" selected.
If I send a message with multiple PDF attachments, the message will be received, but it won't be written to the Sent folder.
I can't afford to lose the archive copy of these messages, so I have adopted the habit of bcc'ing myself, but it's a drag.
Any thoughts?

I don't think this is a Mail issue, I think it's to do with the receiving ISP and the reason the mail can't be delivered. For example, if the address does not exist the mail will probably bounce back straight away but if the recipient's mail box is full then the server may try later and if it's been emptied, the mail will go through - if not, after a few tries it will bounce. Hence the delay.

Similar Messages

  • Multiple emails in outlook 2010 with pdf attachments will not print

    Here is our issue
    1. Select multiple emails in outlook 2010 with pdf attachments (versie 10.0.1)
    2. Go to file -> Print
    3. Select Print Options.  Check the box for Print Attached Files
    4. click Print The emails will print but only the first attachment will print. 
    After that we recieve the following error
    There was an error opening this document. The selected file cannot be found.
    We have tried turning off enhanced security mode but still get the same result

    You can also extract these pdf attachments via email attachment extractor from here and then send the pdf file for printing. I think this will be easier for you to print them all.

  • Mail with PDF attachments bounce back??

    I often send time-sensitive PDFs that need to be reviewed quickly so it ***** to learn a couple of days later that the delivery failed! Is there a way that mail can inform that the email DID arrive successfully? Or is there a way to reduce the amount of times mail tries to send it before it notifies me it failed? Also, any ideas why these emails fail in the first place? They are not huge files!

    I don't think this is a Mail issue, I think it's to do with the receiving ISP and the reason the mail can't be delivered. For example, if the address does not exist the mail will probably bounce back straight away but if the recipient's mail box is full then the server may try later and if it's been emptied, the mail will go through - if not, after a few tries it will bounce. Hence the delay.

  • Problem with PDF attachments on Leopard's mail.

    I just found a bug or something in Leoprd's mail . When I try to send a mail with PDF attachments, mail just stuck, nothing happen. The fan start to spin and mail grab all of the processors power nearly 100 %. What's weird, there aren't problem with sending other attachment like JPG for example. I tested it on all of my accounts and on all of them, situation is exactly the same.

    The same problem here! Mail.app is behaving weirdly, but eventually it stopped sending e-mail with some filetypes attachments (.doc, .xls, .pdf not working, .jpg working), app just freezes - impossible to quit! HEEEELP!!!

  • Send Mail with PDF Attachment in ABAP

    Hi Experts,
    I have a requirement where I need to convert internal table data into PDF format and send it as an E-Mail with PDF attachment to Outlook mail using ABAP.
    How do I achieve this .
    Can anyone send me example code for doing this.
    Thanks
    Kumar

    hiii
    check following code for PDF attachment and mail
    ** Check for any ATTACHMENTS...
    IF d_desired_type = 'RAW'.           " Set to RAW?
    *    PERFORM convert_to_abaplist.       " YES - convert it
      ENDIF.                               " end...
      IF d_desired_type = 'ALI'.           " Set to ALI?
        PERFORM convert_to_alilist.        " YES - convert it
      ENDIF.                               " end...
    * Check for any ATTACHMENTS...
      IF NOT t_soli[] IS INITIAL.          " attachment?
        h_real_type = d_desired_type.      " ENABLE
        h_transf_type = 'X'.               " Transfer type BINARY...
    *   Write PDF/ALI formatted data to BINARY table...
        t_con_bin[] = t_soli[].
    *   Add Packing List (attachment) for PDF...
        DESCRIBE TABLE t_con_bin LINES h_tab_cntr.
        READ TABLE t_con_bin INDEX h_tab_cntr.
        h_doc_data-doc_size = h_doc_data-doc_size
                            + ( ( h_tab_cntr - 1 )
                            * 255 + STRLEN( t_con_bin ) ).
        h_doc_data-obj_descr  = mail_subject.
        h_body_start = 1.
        h_body_num = h_tab_cntr.
    *   Write RAW data if that's what it is (adds to TEXT)...
        IF h_real_type = 'RAW'.
          DESCRIBE TABLE t_con_text LINES h_body_start.
          h_body_start = h_body_start + 1.
          h_transf_type = space.           " Transfer type TEXT...
          LOOP AT t_con_bin.               " Zip thru TEXT stuff
            t_con_text = t_con_bin.        " set TEXT table header..
            APPEND t_con_text.             " add to what's there!
          ENDLOOP.
          CLEAR: t_con_bin.                " clear BINARY header..
          REFRESH: t_con_bin.              " reset BINARY table...
        ENDIF.
        CLEAR t_pak_list.
        IF h_transf_type = 'X'.            " Binary=PDF/ALI?
          t_pak_list-transf_bin = 'X'.
          t_pak_list-head_start = 1.
          t_pak_list-head_num   = 0.
          t_pak_list-body_start = 1.
          t_pak_list-body_num   = h_tab_cntr.
          t_pak_list-doc_type   = h_real_type.
          t_pak_list-obj_name   = 'ATTACHMENT'.
          t_pak_list-obj_descr  = 'Document'(001).
          t_pak_list-doc_size   = ( h_tab_cntr - 1 )
                                * 255 + STRLEN( t_con_bin ).
        ELSE.
          DESCRIBE TABLE t_con_text LINES h_tab_cntr.
          READ TABLE t_con_text INDEX h_tab_cntr.
          t_pak_list-transf_bin = ' '.     " Binary=RAW
          t_pak_list-head_start = 1.
          t_pak_list-head_num   = 0.
          t_pak_list-body_start = h_body_start.
          t_pak_list-body_num   = h_tab_cntr.
          t_pak_list-doc_type   = h_real_type.
          t_pak_list-obj_name   = 'ATTACHMENT'(002).
          t_pak_list-obj_descr  = 'Report'(003).
          t_pak_list-doc_size   = ( h_body_num - 1 )
                                * 255 + STRLEN( t_con_text ).
        ENDIF.
        APPEND t_pak_list.
      ENDIF.
    * Send the EMAIL out with SAP function...
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = h_doc_data
          put_in_outbox              = 'X'
    *      commit_work                = 'X'
        TABLES
          packing_list               = t_pak_list
          contents_bin               = t_con_bin
          contents_txt               = t_con_text
          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.
      IF syst-subrc NE 0.
    *    RAISE send_failed.
        CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
          EXPORTING
            msg_arbgb = '00'
            msg_nr    = '001'
            msg_ty    = 'E'
            msg_v1    = 'O/P Could not be issued '(001)
            msg_v2    = ' Due to No Mail ID'(002)
            msg_v3    = syst-msgv3
            msg_v4    = syst-msgv4
          EXCEPTIONS
            OTHERS    = 1.
    * Check General incompletion status of the header
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ELSE.
          WRITE : 'SENT'.
        ENDIF.
      ELSE.
    *    commit work.
      ENDIF.
    ENDFORM.                               " SEND_MAIL_FAX
    *&      Form  convert_otf_2_pdf
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM convert_otf_2_pdf .
      DATA: "t_line            LIKE tline OCCURS 0 WITH HEADER LINE,
            t_objcont         LIKE soli  OCCURS 0 WITH HEADER LINE,
            d_doc_size(12)    TYPE c,
            d_fle1(2)         TYPE p,
            d_fle2(2)         TYPE p,
            d_off1            TYPE p,
            d_hltlines        TYPE i,
            d_hfeld(500)      TYPE c,
            w_indx            LIKE sy-tabix.
      CLEAR: t_line, t_objcont, d_off1.
      REFRESH: t_line, t_objcont.
    * Check/set DEFAULT Desired-type attachment...
      IF d_desired_type IS INITIAL.        " Entered Desired type?
        d_desired_type = 'PDF'.            " NO  - default to PDF
      ENDIF.                               "
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = d_desired_type
        IMPORTING
          bin_filesize          = d_doc_size
        TABLES
          otf                   = t_itcoo
          lines                 = t_line
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      IF sy-subrc > 0.
        RAISE otf_convert_failed.
      ENDIF.
    ENDFORM.                               " convert_otf_2_pdf
    *&      Form  convert_otf_2_pdf_sx
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM convert_otf_2_pdf_sx .
      DATA:
        t_otf          LIKE solisti1 OCCURS 0 WITH HEADER LINE,"ENABLE
        t_pdf          LIKE tline    OCCURS 0 WITH HEADER LINE,"ENABLE
        doc_size(12)   TYPE n,
        len_out        TYPE i,
        x_real         LIKE  soodk-objtp,
        x_idx_b        LIKE sy-tabix,
        x_idx_e        LIKE sy-tabix.
      IF d_desired_type = 'PDF'.
        d_desired_type = 'OTF'.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
        EXPORTING
          rqident              = d_spool_id
          desired_type         = d_desired_type
        IMPORTING
          real_type            = x_real
        TABLES
          buffer               = t_otf
          buffer_pdf           = t_pdf
        EXCEPTIONS
          no_such_job          = 1
          job_contains_no_data = 2
          selection_empty      = 3
          no_permission        = 4
          can_not_access       = 5
          read_error           = 6
          type_no_match        = 7
          OTHERS               = 8.
      IF sy-subrc <> 0.
        IF sy-subrc = 1.
          RAISE invalid_spool_id.
        ELSE.
          RAISE otf_convert_failed.
        ENDIF.
      ENDIF.
    * Check Desired-Type vs. Real-Type (if any)...
      IF d_desired_type IS INITIAL.
        IF x_real = 'OTF'.
          d_desired_type = 'PDF'.
        ELSE.
          d_desired_type = x_real.
        ENDIF.
      ELSE.
        IF ( d_desired_type = 'PDF' OR
             d_desired_type = 'OTF' ) AND
           ( x_real = 'OTF' OR
             x_real = 'PDF' ).
          d_desired_type = 'PDF'.
        ELSE.
          IF d_desired_type <> x_real.
            RAISE type_no_match.
          ENDIF.
        ENDIF.
        IF ( d_desired_type = 'ALI' OR
             d_desired_type = 'RAW' ) AND
             x_real = 'OTF'.
          RAISE type_no_match.
        ENDIF.
      ENDIF.
    * Check if ABAP-LIST and not SapScript...
      IF d_desired_type = 'ALI' OR
         d_desired_type = 'RAW'.
        t_soli[] = t_otf[].
        EXIT.
      ENDIF.
    * Load OTF data gotten from spool...
      LOOP AT t_otf.
        t_itcoo = t_otf.
        APPEND t_itcoo.
    *   if Vendor P/O (SapScript = Z_MEDRUCK) then
    *      trap INDEX for "Terms & Conditions" on BACK...
        IF t_itcoo-tdprintcom =  'IN' AND
           t_itcoo-tdprintpar =  '01EZ_MEDRUCK       BACK'.
          x_idx_b = sy-tabix.
        ENDIF.
        IF t_itcoo-tdprintcom =  'IN' AND
           t_itcoo-tdprintpar =  '01EZ_MEDRUCK       NEXT'.
          x_idx_e = ( sy-tabix - 1 ).
        ENDIF.
      ENDLOOP.
    * Drop from table if INDEX'S are set (see above)...
      IF ( x_idx_b > 0 AND
         ( x_idx_e > x_idx_b ) ) .
        DELETE t_itcoo FROM x_idx_b
                     TO x_idx_e.
      ENDIF.
      PERFORM convert_otf_2_pdf.
    ENDFORM.                               " convert_otf_2_pdf_sx
    *&      Form  CONVERSION_OF_SIZE                                       *
    * *"Converting the file to get a 255 char single line internal table   *
    * The PDF file that is generated out of the above function module     *
    * cannot be transported as it needs to be of 255 chars. Hence         *
    * converting the file to get a 255 char single line,internal table.   *
    FORM conversion_of_size .
    "Declaring Local Constants............................................
      CONSTANTS:
         cnv_hexconst_zero TYPE x VALUE '00'.
    * Internal table to hold 255 Char's Single Line.                      *
      DATA:
        lv_big_lines(268) TYPE c
                          OCCURS 0 WITH HEADER LINE.
    *"Local Work Variables.................................................
      DATA:
        lfl_flag          TYPE c,
        lv_left_t(268)    TYPE c,
        lv_left_i         TYPE i,
        tv_left_i         TYPE i,
        lv_curr_i         TYPE i.
      FIELD-SYMBOLS: <f>.
    * Get the lines into a table of 268 char as the first step to put it in
    * the pdf file of 255 chars
      CLEAR lfl_flag.
      LOOP AT t_line.
        IF lfl_flag EQ ' '.
          CLEAR lv_big_lines.
          ASSIGN lv_big_lines(134) TO <f>.
          <f> = t_line.
          lfl_flag = 'X'.
        ELSE.
          lv_big_lines+134 = t_line.
          APPEND lv_big_lines.
          CLEAR: lfl_flag.
        ENDIF.                             " If lfl_flag = ''..
      ENDLOOP.                             " Loop at t_pdf
      IF lfl_flag EQ 'X'.
        APPEND lv_big_lines.
      ENDIF.                               " If lflf_flag eq 'X'..
    * Next fill it into a 255 char table
      CLEAR: lv_left_t, lv_left_i, tv_left_i.
      lv_curr_i = 255.
      LOOP AT lv_big_lines.
        IF lv_left_i NE 0.
          IF lv_curr_i NE 0.
            wa_objcont(lv_left_i)           = lv_left_t(lv_left_i).
            wa_objcont+lv_left_i(lv_curr_i) = lv_big_lines(lv_curr_i).
          ELSE.
            wa_objcont = lv_left_t(lv_left_i).
          ENDIF.                           " IF lv_curr_i NE 0
        ELSE.
          wa_objcont = lv_big_lines(lv_curr_i).
        ENDIF.                             " IF lv_left_i NE 0
        APPEND wa_objcont TO t_objcont.
        tv_left_i = 268 - lv_curr_i.
        IF tv_left_i > 255.
          wa_objcont = lv_big_lines+lv_curr_i(255).
          APPEND wa_objcont TO t_objcont.
          lv_left_i = tv_left_i - 255.
          tv_left_i = 255 + lv_curr_i.
          lv_curr_i = 255 - lv_left_i.
          lv_left_t = lv_big_lines+tv_left_i.
        ELSE.
          lv_left_t = lv_big_lines+lv_curr_i.
          lv_left_i = 268 - lv_curr_i.
          lv_curr_i = 255 - lv_left_i.
        ENDIF.                             " IF tv_left_i > 255
      ENDLOOP.                             " LOOP AT lv_big_lines.
      CLEAR wa_objcont .
      ASSIGN wa_objcont(lv_left_i) TO <f>.
      <f> = lv_left_t(lv_left_i).
      APPEND wa_objcont TO t_objcont.
        h_transf_type = 'X'.                 " Transfer type BINARY...
      IF NOT t_objcont[] IS INITIAL.
        t_soli[]     = t_objcont[].        " SapScript doc to Objects...
      ENDIF.
    regards
    twinkal

  • Sending mail with multiple attachments

    hi.I wrote a code to send mail.but i need to send mail with multiple attachments.here is the code i wrote.what should i do to send the mail with multiple attachments.if i run this code iam able to send mails but not attachments.please help me
    <%@ page import="javax.mail.*,javax.mail.internet.*,java.util.Date,java.io.*,java.net.InetAddress,java.sql.*,java.util.Properties,java.net.*,javax.sql.*,javax.activation.*,java.util.*,java.text.*" %>
    <%@ page import="java.io.*,java.sql.*,java.net.*,java.util.*,java.text.*" %>
    <%
         String Attachfiles1="";
         String Attachfiles2="";
    String Attachfiles3="";
    if("Send".equalsIgnoreCase("send"))
              try
         String subject="",from="",url = null,to="";
         String mailhost = "our local host";
         Properties props = System.getProperties();
         String msg_txt="";
         String strStatus="";
    // byte[] bin=.....;
    //Adds Attechment:
    Multipart multipart = new MimeMultipart();
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setText("Here are my attachments");
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    //first attachment
    DataSource source = new FileDataSource("C:\\img1.jpg");
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName("C:\\Telnor1.jpg");
    multipart.addBodyPart(messageBodyPart);
    //Second attachment
    DataSource source2 = new FileDataSource("C:\\img2.jpg");
    messageBodyPart.setDataHandler(new DataHandler(source2));
    messageBodyPart.setFileName("C:\\Telnor2.jpg");
    multipart.addBodyPart(messageBodyPart);
    //etc...
    message.setContent(multipart);
    Transport.send( message );
    String mailer = "MyMailerProgram";
    to=request.getParameter("to");
    from=request.getParameter("from");
    subject=request.getParameter("subject");
    msg_txt=request.getParameter("message");
    props.put("mail.smtp.host", mailhost);
    Session mailsession = Session.getDefaultInstance(props, null);
    Message message = new MimeMessage(mailsession);
    message.setFrom(new InternetAddress(from));
    message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
    message.setSubject(subject);
    message.setHeader("X-Mailer", mailer);
    message.setSentDate(new Date());
    message.setText(msg_txt);
    BodyPart messageBodyPart = new MimeBodyPart();
    BodyPart messageBodyPart2 = new MimeBodyPart();
    Multipart multipart = new MimeMultipart(); // to add many part to your messge
    messageBodyPart = new MimeBodyPart();
    javax.activation.DataSource source = new javax.activation.FileDataSource("path of the file");
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName("file_name");
    messageBodyPart2.setText("message"); // set the txt message
    multipart.addBodyPart(messageBodyPart);
    multipart.addBodyPart(messageBodyPart2);
    Transport.send(message);
    out.println("Message Sent");
    catch (Exception e)
    e.printStackTrace();
    if("Attachfiles".equalsIgnoreCase("attachfiles"))
    Attachfiles1=request.getParameter("fieldname1");
    Attachfiles2=request.getParameter("fieldname2");
    Attachfiles3=request.getParameter("fieldname3");
    %>
    <html>
    <body>
    <div class="frame">
         <form action="Composemail.jsp" method="post">
              <b>SelectPosition:</b> <select name="cars" >
    <option value="ABAP">ABAP
    <option value="saab">Saab
    <option value="fiat">Fiat
    <option value="audi">Audi
    </select><br><br>
    <table border="1" cellpadding="2" cellspacing="2">
    <tr><th>Name</th>
    <th>EmailId</th>
    <th>ContactNumber</th>
    <th>Position</th>
    </tr>
    <tr>
    <td>
    </td>
    </tr>
    </table><br>
    <b>SelectUser :</b><select name="cars">
    <option value="Administrator">Administrator
    <option value="saab">Saab
    <option value="fiat">Fiat
    <option value="audi">Audi
    </select>
    <br>
    <b>To :</b>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="text" name="to" size="72"><br>
    <b>From :</b>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="text" name="from" size="72"><br>
    <b>Subject :</b>&nbsp&nbsp&nbsp<input type="text" name="subject" size="72"><br>
    <%=Attachfiles1%><br><%=Attachfiles2%><br><%=Attachfiles3%><br><br>
    <b>Message:</b><br>
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<textarea rows="10" cols="50" name="message">
    </textarea> <br><br>
    <b>AttachedFile:</b>&nbsp<input type="file" name="fieldname1" value="filename" size="50"><br><br>
    <b>AttachedFile:</b>&nbsp<input type="file" name="fieldname2" value="filename" size="50"><br><br>
    <b>AttachedFile:</b>&nbsp<input type="file" name="fieldname3" value="filename" size="50"><br><br>
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="submit" name="attachfiles" value="Attachfiles">
    <center>
    <input type="submit" name="send" value="Send" >
    </center>
    </form>
    </div>
    </body>
    </html>

    Create a separate MimeBodyPart object for each attachment, rather than reusing
    the same one over and over.

  • HT1146 How do I print an email in Apple Mail without PDF attachments?

    I received an email with PDF attachments. I want to print just the email without the attachments but they automatically load in the print file EVER AFTER I've converted them to be viewed as icons in the message window.
    I searched online, call an Apple store and spoke to customer support who wanted to charge me a $19 fee for something possibly not even possible. In short, I haven't received a solution.
    Can anybody help me? Ready to download an alternate mail app.
    Thank you.

    Opening it won't do you any harm. Just don't click any of the links.

  • Sending mail with 2 attachments

    Hi All,
            I have a requirement where I have to send a mail with 2 attachments. Both attachments should be excel sheets.
    Iam using the function module
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = gd_sent_all
        TABLES
          packing_list               = it_packing_list
          contents_txt               = it_message
         contents_bin               = it_attachment
          receivers                  = it_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    I don't know where to pass another attachment.
    How can it be done?
    Kindly help me.
    Regards,
    Krithika

    Hi,
    Try this code.
    you have to populate both packing_list and contents_bin internal tables before passing to the fm SO_NEW_DOCUMENT_ATT_SEND_API1
    FORM CONVERT_OTF_TO_PDF TABLES OTFTAB STRUCTURE OTF.
      CLEAR: SOOD, W_LINES, CONTENT_IN, CONTENT_OUT.
      REFRESH: CONTENT_IN, CONTENT_OUT.
      DESCRIBE TABLE OTFTAB LINES W_LINES.
      SOOD-OBJLEN = W_LINES.
      REFRESH: CONTENT_IN, CONTENT_OUT.
      CLEAR: CONTENT_IN, CONTENT_OUT.
       CONTENT_IN[] = OTFTAB[].
        CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
             EXPORTING
                  FORMAT_SRC      = 'OTF'
                  FORMAT_DST      = 'PDF'
                  DEVTYPE         = 'HPLJ5SI'
    *         FUNCPARA        =
                  LEN_IN          = SOOD-OBJLEN
    *    IMPORTING
    *         LEN_OUT         =
             TABLES
                  CONTENT_IN      = CONTENT_IN
                  CONTENT_OUT     = CONTENT_OUT
             EXCEPTIONS
                  ERR_CONV_FAILED = 1
                  OTHERS          = 2.
      REFRESH OBJBIN. CLEAR OBJBIN.
      IF GV_SUMMARY <> 'X'.
        OBJBIN[] = CONTENT_OUT[].
      ELSE.
        REFRESH CONTENT_OUT.
        CLEAR CONTENT_OUT.
      ENDIF.
      REFRESH: CONTENT_IN, OBJPACK.
      CLEAR: CONTENT_IN, OBJPACK.
      DOC_CHNG-OBJ_NAME = TEXT-003.
      IF SY-SYSID NE 'S4P'.
       IF DOC_CHNG-OBJ_DESCR IS  INITIAL.
          DOC_CHNG-OBJ_DESCR = TEXT-004.
        ELSE.
          IF GV_SUMMARY = 'X'.
           DOC_CHNG-OBJ_DESCR = TEXT-012.
          ENDIF.
        ENDIF.
      ENDIF.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    * Fill the fields of the packing_list for the main document:
        CLEAR  OBJPACK.
        DESCRIBE TABLE OBJBIN LINES TAB_LINES.
       OBJPACK-TRANSF_BIN = 'X'.
        OBJPACK-HEAD_START = 1.
        OBJPACK-HEAD_NUM = 0.
        OBJPACK-BODY_START = 1.
        OBJPACK-BODY_NUM = TAB_LINES.
        OBJPACK-DOC_TYPE = 'XLS'.
        OBJPACK-OBJ_NAME = 'Attachment'.
        OBJPACK-OBJ_DESCR = C_PAYER.
        READ TABLE OBJBIN INDEX TAB_LINES.
        DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
        OBJPACK-DOC_SIZE = DOC_SIZE.
        APPEND OBJPACK.
        CLEAR  OBJPACK.
        DESCRIBE TABLE OBJBIN LINES TAB_LINES.
       OBJPACK-TRANSF_BIN = 'X'.
        OBJPACK-HEAD_START = 1.
        OBJPACK-HEAD_NUM = 0.
        OBJPACK-BODY_START = 1.
        OBJPACK-BODY_NUM = TAB_LINES.
        OBJPACK-DOC_TYPE = 'XLS'.
        OBJPACK-OBJ_NAME = 'Attachment'.
        OBJPACK-OBJ_DESCR = C_PAYER.
        READ TABLE OBJBIN INDEX TAB_LINES.
        DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
        OBJPACK-DOC_SIZE = DOC_SIZE.
        APPEND OBJPACK.
        REFRESH RECLIST.
        CLEAR RECLIST.
    ** get E-mail address
          IF NOT P_EMAIL IS INITIAL.
            RECIPIENT_INT-ADDRESS = P_EMAIL.
          ENDIF.
            RECLIST-RECEIVER = RECIPIENT_INT.
            RECLIST-REC_TYPE = 'U'.
            APPEND RECLIST.
    * SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
    * FOR SENDING DOCUMENTS WITH ATTACHMENTS
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOC_CHNG
                PUT_IN_OUTBOX              = 'X'
           IMPORTING
                SENT_TO_ALL                = SENT_TO_ALL
           TABLES
                PACKING_LIST               = OBJPACK
                OBJECT_HEADER              = OBJHEAD
                CONTENTS_BIN               = OBJBIN
                CONTENTS_TXT               = OBJTXT
                RECEIVERS                  = RECLIST
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
               OTHERS                     = 99.
    Regards,
    Sailaja.

  • Sending mails with binary attachments

    Hi!
    I've to implement a routine for sending an email with attachments.
    These attachments can be PDF- or HTML-Files. Sometimes the last of the PDF-Attachments could not be opened when receiving the mail (it can't be open in the SOST as well).
    My coding is:
          loop at lt_doks.
            select single * from toadv where ar_object eq lt_doks-ar_object.
            call function 'ARCHIVOBJECT_GET_TABLE'
              exporting
                archiv_id                = lt_doks-archiv_id
                document_type            = toadv-doc_type
                archiv_doc_id            = lt_doks-arc_doc_id
              importing
                length                   = l_length
              tables
                archivobject             = l_image_tab
              exceptions
                error_archiv             = 1
                error_communicationtable = 2
                error_kernel             = 3
                others                   = 4.
            clear objpack.
            perform convert_document tables l_image_tab
                                            objbin
                                     using tab_lines_new
                                           i_pernr
                                           i_reinr
                                           l_subrc.
            if l_subrc ne 0.
              raise convert_error.
            endif.
            objpack-transf_bin = 'X'.
            objpack-head_start = 3.
            objpack-head_num = 0.
            objpack-body_start = tab_lines + 1.
            objpack-body_num = tab_lines_new.
            objpack-doc_type = toadv-doc_type.
            objpack-obj_name = 'Attachment'.
            objpack-obj_descr = lt_doks-objecttext.
            objpack-doc_size = tab_lines_new * 255."l_length.
            append objpack.
            tab_lines = tab_lines + tab_lines_new.
            clear tab_lines_new.
          endloop.
        endif.
      endif.
      if not document_data-obj_descr is initial.
    jetzt wird's ernst -> Mail versenden
        call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          exporting
            document_data              = document_data
            put_in_outbox              = ' '
            commit_work                = 'X'
          tables
            packing_list               = objpack
            contents_txt               = daten
            contents_bin               = objbin
            receivers                  = 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.
      endif.
    form convert_document tables p_image_tab structure docs
                                 p_objbin structure solisti1
                          using  p_lines
                                 p_pernr
                                 p_reinr
                                 p_subrc.
      data: l_filename like filename-fileextern.
      clear p_lines.
      call function 'FILE_GET_NAME'
        exporting
          client           = sy-mandt
          logical_filename = 'Z_HRTV_CONVERT'
          operating_system = sy-opsys
          parameter_1      = p_pernr
          parameter_2      = p_reinr
        importing
          file_name        = l_filename
        exceptions
          file_not_found   = 1
          others           = 2.
      if sy-subrc ne 0.
        p_subrc = sy-subrc.
        exit.
      endif.
    Schreiben der Datei
      open dataset l_filename for output in binary mode.
      loop at p_image_tab.
        transfer p_image_tab to l_filename.
      endloop.
      close dataset l_filename.
      refresh p_image_tab.
      clear p_image_tab.
    Lesen der Datei
      open dataset l_filename for input in binary mode.
      do.
        read dataset l_filename into p_objbin.
        if sy-subrc <> 0.
          if not p_objbin is initial.
            append p_objbin.
            clear p_objbin.
            add 1 to p_lines.
          endif.
          exit.
        endif.
        append p_objbin.
        clear p_objbin.
        add 1 to p_lines.
      enddo.
      close dataset l_filename.
    Löschen der Datei
      delete dataset l_filename.
    endform.                    " convert_document
    Can anybody give me hint?
    Thanks a lot!
    Peter

    Hi,
    Whether your objpack-doc_type is coming correctly for the last PDF attachment?
    Thanks
    aRs

  • Workflow Step 'In Process'- Send mail with PDF attachment

    Hi,
    have to send mail with PDF attachment.
    I have written a function module with following steps,
    1. Convert SPOOL number to PDF using Function Module 'CONVERT_OTFSPOOLJOB_2_PDF'.
    2. Send mail with PDF attachment using Function Module 'SO_DOCUMENT_SEND_API1'.
    The Function Module is giving required output when tested and called in the report(Background Job).
    When I call this Function Module from Method-> Workflow Task the Workflow steps status is 'In Process' and not ending.
    Could you please help me on this??

    Hi shafath,
    When you try to send mail,  You need to call the function FP_JOB_OPEN before calling the function module to generate the pdf. ( /1B****)  . Is it missing in your code?

  • Send PO Mail with PDF File that Chinese character doestn't display

    Send PO Mail with PDF File that Chinese character doestn't display.
    I am using RSTXPDFT4, unicode ECC6.0
    Some computer Adobe Reader can read the file, but some computer cannot read, just a blank page.
    Thanks.

    Hi
    I worked for one client-chinese where we have to print chinese & english ( bilingual).You need to have dricer program which could identify both scripts .You are right ( unicode0
    Please check for the driver program : TWPDF : PDF converter Chinese in SPAD setting.
    SAP note is available.I will check and let you update .
    Edited by: sunny on Oct 28, 2009 10:29 AM

  • Can´t send emails with pdf attachments - why?

    Since i moved all my accounts to my new airbook (OS X 10.8.2) everything works fine BUT i am not able to send emails with pdf attachments.I have an exchange and a mac.account - but they both won`t work.
    The emails stay put in the local ausgang? exit box and won`t move away unless i delete them.
    i checked the accounts, the activity - all says it works fine - but it doesn`t!
    Maybe in the *deep* of my mac is one thing that says no pdf - but where can i find it?
    I appreciate every helpful hint :-)
    greetings

    it tries to send the email for about five minutes and than gives the message *server doesn't work* you want to try another? repeat? or later?
    when i change the server e.g. from exchange to mac - tries again and without further notice i find the message in the outbox - even when i click that one and *send* again - nothing changes......
    I already tried to name the attachments in.pdf - i also change the pdf to jpeg - nothing works - all emails i write after that go immediately to the outbox - so when i want to send messages at all i need to delete the ones with the attachment or send the other ones manually
    Please notice in the activity window there is a lot of traffic :-) but it doesn`t help
    i even closed all other programmes like excel,safari and stuff - but still
    and i still have al lot of free GB on my airbook....
    any idea????

  • Sending mail with multiple attachments in jsp

    hi .I wrote a code to send a mail in jsp.but now i need to send mails with multiple attachments.how can i send mail with multiple attachment.

    Create a separate MimeBodyPart object for each attachment, rather than reusing
    the same one over and over.

  • How to send a mail with PDF attachment

    Hello
    Good Day!
    We have a requirement to send the mail with pdf attachment. Pdf file will be remain same for all mails and it will be placed at server. We are on R12.4 and below is the database information :
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Thanks a ton for your anticipated help!
    Thanks
    Gaurav

    The word URGENT is considered as rude in this forum.. Nobody here is getting paid for the ansers they are giving..
    Just have a look at These threads.Those will help you.

  • Send PO Mail with PDF File that Chinese character doestn't display correctl

    Send PO Mail with PDF File that Chinese character doestn't display !
    I am using RSTXPDFT4 , tried different computer, some Adobe Reader can read
    some are Blank .......
    why ?

    Hi,
    那不是要每一台 PC 如果看不到中文就要更新 ?
    如果用戶不懂, 那就不是永遠看不見 ? 因為那是供應商嗎 !

Maybe you are looking for

  • How to change the icon for 'windows group' in Java 1.6 [Windows XP] ?

    Hello, I was wondering if there is a possibility to change the icon for 'windows group' in Java 1.6... I'm using Windows XP SP2. Now the windows from my Java 1.6 application are grouped with the standard Sun icon [screen below] on the group. http://i

  • License question

    I'm considering buying LE8, but I'm hesitating over the clause in the SLA which limits it to one computer. I go back and forth between desktop and laptop (iMac and MPB) all the time. With Aperture, the license lets me install on both computers, as lo

  • Sending e-mails from sqlplus

    Hi, I want to send a mail to dba from sqlplus. How do I do it. In unix we have mailx -s . If anyone would like to share the following script , that would be helpful. Send an alert to DBA if the tablespace size exceeds 85%. Regards & Thanks, PrabhathG

  • Transaction code to view/edit IT0007 and IT0008

    Dear SAP Guru's, Can you please tell me the transaction code to view/edit IT0007 and IT0008? Sincerely, Ketan

  • Unhappy to find out that I was lied to to get the sale

    On January 9th of this year I went to my local Best Buy to look at computers because mine had crashed and I had decided to replace it since it was an older model. I was greeted by an associate and I told him specifically that I was looking to spend a