Deal with mails with / without attachments

My codes actually can save the image attachment of emails from email server. But, one problem I have is the codes don't work for mails with no attachment. How can solve this? I have added the structure of how I coded it. I am not sure if I can modify the 2nd part of the codes such that mails without attachment can work too. Pls advise. thank.
My code pattern is like this:
1st part : Connection.
2nd part:
if (contentType.startswith("image/")){
//get the image and save to folder and insert path to image table of database
if (contentType.startswith("text/plain")){
// insert image id and text to another table of database
3rd part: Delete email.

I don' have the demo folder currently. Any sample code that can be posted here?
I tried
if(disposition == null){
//do this for emails with no attachment
else if (disp.equalsIgnoreCase(Part.ATTACHMENT)){
//do this with attachments
else{
out.println("invalid");
But it still can't work. The (disp == null) seems to pass in all values for both emails with attachments or no attachments....Why??

Similar Messages

  • How to deal with SOAP attachments?

    Is there any information available on how to work with SOAP attachments? I am looking
    for a feature similar to what is available in other products where you can take a
    byte[] and map to image/jpg, application/octet-stream, etc... and have the tool create
    the appropriate message formats. How would I do this using WL Workshop? I could
    not find anything in the docs... is this supported?
    Thanks,
    Bob

    Easiest thing is to encode the contents of the binary object in the XML
    message as you suggest.
    I'd like to hear more about what you are trying to do as well -- we're
    planning on adding support for attachments in the next release, and I'd like
    to make sure we do it in a way that meets your needs.
    -C
    "Bob Hayden" <[email protected]> wrote in message
    news:[email protected]...
    >
    I am evaluating the capability of returning and consuming image/fileattachments through
    a web service. This is one of our high priority integration requirementsand must
    be available somehow through the framework we choose. Other productshave ways
    to do this through an IDE... if WorkShop is not going to directly supportthis then
    does anyone have any suggestions or examples on how this can be done in away that
    is still intuitive for a WorkShop user (in other words without rolling upyour sleeves
    and digging into JAX-RPC)? I suppose one could base64 it and add it tothe WorkShop-generated
    message as a String using the return XML map, but I would prefer toinvestigate a
    more standards-based approach.
    Is it just me or does the lack of support for SOAP attachments seem to bea serious
    missing piece from WL Workshop?
    -Bob
    "Raj Alagumalai" <[email protected]> wrote:
    Bob,
    WebLogic Workshop does not currently support SOAP attachments. However,
    please note
    that if you are developing your Web services using the APIs and services
    provided
    by J2EE and WebLogic Server directly, WebLogic Server does support SOAP
    attachments.
    Please refer to the following document for more Workshop FAQ's
    http://dev2dev.bea.com/resourcelibrary/faqdetail.jsp?productType=weblogic+w
    orkshop&highlight=faq
    >>
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Bob Hayden" <[email protected]> wrote:
    Is there any information available on how to work with SOAP attachments?
    I am looking
    for a feature similar to what is available in other products where youcan
    take a
    byte[] and map to image/jpg, application/octet-stream, etc... and havethe
    tool create
    the appropriate message formats. How would I do this using WL Workshop?
    I could
    not find anything in the docs... is this supported?
    Thanks,
    Bob

  • EPrint - delays in printing and what can it REALLY deal with in attachments; and duplex printing

    I have my wirelessly connected 6500A plus (710n I think) setup for ePrint.  While it mostly works, I have had occasions where a document (with graphics usually) will make it to the ePrintcenter printer queue but not print - and usually NO ePrintcenter error message or notification.
    Are there a set number of attachment types and/or email document sizes that are "in play" for the ePrintCenter service?
    Lastly, is there a way to have the printer default set to duplex print for ePrint "jobs"?
    Brian O'Hanlon

    These FAQ's may help: http://h30495.www3.hp.com/about/eprint#a2-3
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Mail backup without attachments

    Hi
    Without removing attachments from my primary mail folders, does anyone know a way of making a backup of my mail that would not include attachments?
    My aim is to make a relatively concise backup of the contents of my mail that I can store online without taking up all my capacity.
    Grateful for any advice!!
    Thanks!

    Apple's "Mail" app does not offer that flexibility at this point.

  • Slow outgoing Pop mail with Lion- is anyone else having this problem?  Email without attachments can take 10 minutes or more to go.

    Outgoing pop mail is very slow - at times 10 - 20 minutes and more, even on messges with no attachments.  This has happened since my upgrade to Lion.  My DSL line tests out ok, but Apple says it must be a slow line.  Any one else have problems?

    POP is only used for incoming mail.   Some POP servers are the same as SMTP servers.
    Check to make sure your internet service provider can either give you an SMTP server, or that you are using password authentication to get to an outside line with the proper port.  Outside SMTP servers are often on one of the  ports 587, 2626, 2662, and often use your full e-mail address for username authentication.

  • Auto-delete mails with ZIP attachments?

    Unfortunately, I have to do business with Windows users whose machines seem to be infested with viruses that harvest email addresses. As a result, I am engulfed daily with mail that contains Windows virus attachments (ZIP files) and spam with GIF attachments. And I'm tired of it. Reporting the senders to their ISPs is an exercise in futility.
    Since the only legitimate attachments I receive from clients are always, and without exception, Stuffit SIT or SITX files, is there any way to set up a rule in Mail that will delete emails with ZIP or GIF attachments but allow those with SIT/SITX files through?
    There doesn't seem to be a way to add "Attachment" to the list of headers in Rules. In view of the fact that the most common vector for viruses is via email attachments, this seems to be a major oversight on Apple's part.
    Any hints on dealing with this?
    Kind regards.

    Dave,
    sorry for being late but I just saw your message now...
    In 10.3.x, there indeed is no way to filter based on attachment names (this is a new feature present in 10.4.x). However, you should be able to mark all those messages as spam and filter them to your junk mailbox using Junk Matcher:
    http://junkmatcher.sourceforge.net/
    Andreas

  • Rule to delete all mail with ZIP attachments?

    Unfortunately, I have to do business with Windows users whose machines seem to be infested with viruses that harvest email addresses. As a result, I am engulfed daily with mail that contains Windows virus attachments (ZIP files) and spam with GIF attachments. And I'm tired of it. Reporting the senders to their ISPs is an exercise in futility.
    Since the only legitimate attachments I receive from clients are always, and without exception, Stuffit SIT or SITX files, is there any way to set up a rule in Mail that will delete emails with ZIP or GIF attachments but allow those with SIT/SITX files through?
    There doesn't seem to be a way to add "Attachment" to the list of headers in Rules. In view of the fact that the most common vector for viruses is via email attachments, this seems to be a major oversight on Apple's part.
    Any hints on dealing with this ****?
    Kind regards.
    Message was edited by: Dave Bourke. I'm sorry, when did the common word for Hades become forbidden? John Milton is on the banned list now? What is happening to the world?

    Many thanks for your very helpful response, Mikkel.
    However, when I expand the headers on any mail that contains an attachment, there is no header named "Attachment," just a paperclip symbol with an expand arrow.
    So if I go to create a Rule, first of all there is no "Attachment" header in the Conditions list, and second it is unclear how to enter such a symbol-based header in the "Edit Header List..." dialog. Do I simply type the word "Attachment" into the dialog as a header even though it never actually appears in any emails with attachments?
    Still mystified...
    Kind regards.

  • Since upgrading to Yosemite on my iMac, My Mail app refuses to open, Safari won't load, and I can't upload pictures from my iPad... Please help, any ideas very welcome. I've had my iMac since 2011, and have never had any issues to deal with before..

    Since upgrading to Yosemite on my iMac: My Mail app refuses to open, Safari won't load, and I can't upload pictures from my iPad...
    Please help, any ideas very welcome. I've had my iMac since 2011, and have never had any issues to deal with before..
    Thanks

    29/11/2014 20:17:01.315 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 11 seconds. Pushing respawn out by 49 seconds.
    29/11/2014 20:17:37.013 com.apple.backupd[616]: Finished scan
    29/11/2014 20:17:43.108 com.apple.backupd[616]: Saved event cache at
    /Volumes/Time Machine Backups/Backups.backupdb/Geoff Lambrechts’s iMac
    (2)/2014-11-29-200648.inProgress/9B453663-603F-40B8-AC21-24F05C724E15/.6162AD34- 38F8-30AB-98E0-4A22FB9D311F.eventdb
    29/11/2014 20:17:43.207 com.apple.backupd[616]: Not using file event
    preflight for Macintosh HD
    29/11/2014 20:18:01.561 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 11 seconds. Pushing respawn out by 49 seconds.
    29/11/2014 20:18:16.288 com.apple.xpc.launchd[1]:
    (com.apple.quicklook[715]) Endpoint has been activated through legacy
    launch(3) APIs. Please switch to XPC or bootstrap_check_in():
    com.apple.quicklook
    29/11/2014 20:18:23.705 com.apple.SecurityServer[56]: Session 100013 created
    29/11/2014 20:18:32.046 mdworker[718]: code validation failed in the
    process of getting signing information: Error Domain=NSOSStatusErrorDomain
    Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
    29/11/2014 20:19:01.662 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 11 seconds. Pushing respawn out by 49 seconds.
    29/11/2014 20:19:45.458 com.apple.xpc.launchd[1]:
    (com.apple.imfoundation.IMRemoteURLConnectionAgent) The
    _DirtyJetsamMemoryLimit key is not available on this platform.
    29/11/2014 20:19:59.123 com.apple.xpc.launchd[1]:
    (com.apple.PubSub.Agent[725]) Endpoint has been activated through legacy
    launch(3) APIs. Please switch to XPC or bootstrap_check_in():
    com.apple.pubsub.ipc
    29/11/2014 20:19:59.123 com.apple.xpc.launchd[1]:
    (com.apple.PubSub.Agent[725]) Endpoint has been activated through legacy
    launch(3) APIs. Please switch to XPC or bootstrap_check_in():
    com.apple.pubsub.notification
    29/11/2014 20:20:01.138 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:21:01.484 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:21:13.430 com.apple.backupd[616]: Found 4529 files (1.1 GB)
    needing backup
    29/11/2014 20:21:18.786 com.apple.backupd[616]: 2.82 GB required (including
    padding), 1.24 TB available
    29/11/2014 20:21:31.775 Console[734]: Failed to connect (_consoleX) outlet
    from (NSApplication) to (ConsoleX): missing setter or instance variable
    29/11/2014 20:21:34.230 WindowServer[162]: disable_update_timeout: UI
    updates were forcibly disabled by application "Console" for over 1.00
    seconds. Server has re-enabled them.
    29/11/2014 20:21:36.898 WindowServer[162]: common_reenable_update: UI
    updates were finally reenabled by application "Console" after 3.67 seconds
    (server forcibly re-enabled them after 1.00 seconds)
    29/11/2014 20:21:36.971 coreservicesd[83]: SFLEntryBase::ListHasChanged
    mach_msg returned 10000004d
    29/11/2014 20:22:01.817 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:23:02.170 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:24:02.547 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:25:02.168 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:02.233 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:02.236 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:02.284 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:03.059 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:25:12.674 com.apple.xpc.launchd[1]:
    (com.apple.imfoundation.IMRemoteURLConnectionAgent) The
    _DirtyJetsamMemoryLimit key is not available on this platform.
    29/11/2014 20:26:03.464 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:27:03.841 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    On 29 November 2014 at 19:29, Apple Support Communities Updates <

  • In my 16 gb iPhone 5, Mail has used up 5,6 gbs of memory.  Trash is empty and there are a few mails in my accounts with no attachments.  What's wrong?

    In my 16 gb iPhone 5, Mail has used up 5,6 gbs of memory (and is increasing).  Trash is empty and there are a few mails in my accounts with no attachments.  What's wrong?

    These are Apple's tips on this:
    Will not turn on, will not turn on unless connected to power, or unexpected power off
    Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
    Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIs and corrosion.
    Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
    After at least 15 minutes, if:
    The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see the battery icon in the upper-right corner of the screen. Then unplug the phone from power. If it immediately turns off, seek service.
    The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
    Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
    If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
    If the display turns on, go to step 4.
    If the display remains black, go to next step.
    Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
    If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.

  • 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.

  • 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.

  • SAP PI7.31 : Mail with multiple attachments - how to process via UDF

    Hi
    wondering how I can approach this problem.   I have to read an Email with any number of attachments  - it can have between 1 and 4 or maybe more of different types (CSV,XLS,PDF,ZIP).  I need to read this email and extract the attachments to a folder.
    Just to let you know I have done this OK for an email that I know only has 2 attachments ! Works perfectly - just no good for ?n? attachments !
       Mail Sender has AF_Modules/MultipartHeaderBean to add payload Attributes
       The message is sent to 2 Receivers
       Each Receiver File adapter then uses AF_Modules/DynamicConfigurationBean and AF_Modules/PayloadSwapBean
    Problem is that when I do not know how many attachments there are.  So I will have to write a Java UDF mapping, perhaps using the classTransformationInput.
    My question is : To create a Java UDF what should be structure of a sent Email message Type look like so I can feed that into a UDF to check what payload attachments there are etc ?.

    As long as you use java mapping, you can have any dummy structures for your interfaces.
    But, if you prefer to use graphical mapping with UDF, then you should have some valid structures for your mail and file interfaces. e.g., mail pack XSD for mail interface as metioned by Indrajit Sarkar
    and again the same structure for the file interface as well so that you can have one to one mapping an then make use of UDF code from the article. Use payload swap bean in the receiver file channel to replace xml payload with Zipped attachments and then finally use script to unzip this zip file.
    Rgds,
    Praveen Gujjeti

  • 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!!!

  • 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.

  • Mail hangs when I try to open emails with certain attachments

    When I try to open emails with certain attachments, rather PS files (if I recall correctly) it hangs. It seems that Mail is trying to load the PS file for me, and maybe convert it to PDF, which take awful lot of time.
    So at the moment I cannot do anything! Because even if I force quit, and start the Mail program again, it tries to open this same email again!
    My question is: How can I prevent Mail from automatically loading attachments? I would the same for images etc. I want the power to load and view attachments whenever I want them to load.

    Do you keep the message preview pane open?
    If so, close the message preview pane below the message list by double-clicking on the horizontal divider bar that separates the message list from the preview pane.
    This will require double-clicking on a message in the message list to open it. If you have the Attachments and Message Size columns selected for the message list, you can select when you want to open a message that contains a large attachment or attachments.
    If this is for a POP type account, there is no setting in Mail to prevent a message attachment from being loaded when opening the message if the message with attachment has been downloaded from the server.
    Have a look at Mail Attachments Iconizer.
    http://lokisw.com/index.php?item=MailAttachmentsIconizer

Maybe you are looking for

  • The document "view.do.pdf" could not be exported as "view.do.pdf".

    Just recently I have been getting the following message when trying to safe a document as a pdf "The document "view.do.pdf" could not be exported as "view.do.pdf".  I updated all of my software and cannot figure out why I cannot save a document from

  • Recommandations for upgrading from 46C to ECC 6.0

    Hello Our SAP system landscape is actually in 46c and is only composed of 3 servers with almost 40 users declared (25 actives) on production system. Modules FI/CO HR MM are actually implemented. We plan to upgrade the system to ECC 6.0 between March

  • Display symetrical list box

    Hi all I have a value in list box like this.Its dynamic list box .it means im facthing all value of list box from database. partnumber/purchaseorder/workorder mel 2005=>555555=>PA720 KDM-1087=>89898=>PA711 assembly2005=>454543=>PA718 1=>786=>PA721 i

  • Strange happening!

    Just had a strange happening - I was working on an Excel spreadsheet with Backup running in the background. When suddenly the screen went grey (I could still see through it to what I had been working on), no cursor and a message that I needed to rebo

  • Oracle 9i certification deprecated yet??

    Anybody know if this 9i certification path is deprecated yet ( is ii still possible to do exams ? ) . I'm just that little bit slow in completing it ( lots of other things to do , etc etc ) Thanks George