PowerPoint file as an attachment

Hello:
I am using JavaMail 1.4 and the activation framework to send email from cmdline. I am using
JDK 1.6.
The task is send an HTML email (inline) and an accompanying PPT as an attachment.
Here is the code fragment:
String filename = "Something.ppt";
DataSource source = new FileDataSource(filename);
pptAttachmentBodyPart.setDataHandler(new DataHandler(source));
pptAttachmentBodyPart.setFileName(filename);
pptAttachmentBodyPart.setDisposition(Part.ATTACHMENT);
mp.addBodyPart(pptAttachmentBodyPart);
message.setContent(mp);
Transport.send(message);
I also have META-INF/mime.types file with the following line:
application/vnd.ms-powerpoint ppt
The ppt file is approx 320 kbyes.
However, when the mail is received, only 130 Kbytes have been sent as an attachment.
Further part of the PPT file is sent inline and right below the HTML email.
What is going on? I am running this on Red Hat Linux WS 4.0
Help, please.
Thanks.

First, make sure you're using the Sun version of JavaMail, not the Gnu version that ships
with many Linux systems.
Turn on session debugging (see the FAQ) and make sure the message text being sent
to the server is correct.
I don't see anything wrong with your code, but you might want to try some of the demo
programs that come with JavaMail to make sure they're working correctly.

Similar Messages

  • I'm trying to invoke EXCEL or POWERPOINT file into the browser IE 6.0.  The

    I'm running TOMCAT locally on my PC (running Windows NT).
    I'm trying to invoke EXCEL or POWERPOINT file into the browser IE 6.0.
    The output is coming out all scrambled (almost like ASCII code or something),
    where it seems like the applications are not firing up.
    However, an MSWord file shows up fine. So I go to the WEB.XML file in the TOMCAT\CONF
    folder and notice that a MIME type has been set up for MSWord and not the other two.
    I set one up for EXCEL and POWERPOINT but the XLS or PPT files still don't work.
    So, just for kicks, I comment out the MSWord MIME definition but the MSWord file still worked!!!
    I can't figure out what's going on here.
    I'm stopping and starting the TOMCAT service each time I make changes to the WEB.XML file,
    but it seems like none of the changes are taking affect.
    I install all the viewers for MS-Word, ppt, and excell.
    But in Netscape it works fine.

    To support various file formats in IE browser while using window.open like .doc, .docx, .ppt, .pptx, .xls, xlsx etc.,
    The following code can also be used to force any format to get launch outside IE
    For these first configure a filter in web.xml and then include the filter class in given path
    <filter>
    <filter-name>MimeFilter</filter-name>
    <filter-class>com.srk.MimeFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>MimeFilter</filter-name>
    <url-pattern>*.xls</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MimeFilter</filter-name>
    <url-pattern>*.xlsx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MimeFilter</filter-name>
    <url-pattern>*.ppt</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MimeFilter</filter-name>
    <url-pattern>*.doc</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MimeFilter</filter-name>
    <url-pattern>*.docx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MimeFilter</filter-name>
    <url-pattern>*.pptx</url-pattern>
    </filter-mapping>
    and then include the filter class in the declared path
    import java.io.*;
    import java.util.logging.*;
    import javax.servlet.*;
    import javax.servlet.Filter;
    import javax.servlet.http.*;
    public class MimeFilter implements Filter {
    public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain) throws IOException, ServletException {
    HttpServletResponse httpResp = (HttpServletResponse) response;
    HttpServletRequest httpReq = (HttpServletRequest) request;
    String fileUrl = httpReq.getRequestURI();
    if(fileUrl.lastIndexOf(".xls")!=-1)
    fileUrl = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
    httpResp.setContentType("application/vnd.ms-excel");
    httpResp.setHeader("Content-disposition", "attachment; filename="+fileUrl);
    if(fileUrl.lastIndexOf(".ppt")!=-1)
    fileUrl = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
    httpResp.setContentType("application/powerpoint");
    httpResp.setHeader("Content-disposition", "attachment; filename="+fileUrl);
    if(fileUrl.lastIndexOf(".doc")!=-1)
    fileUrl = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
    httpResp.setContentType("application/msword");
    httpResp.setHeader("Content-disposition", "attachment; filename="+fileUrl);
    chain.doFilter(request, response);
    public boolean isLoggable(LogRecord record) {
    return false;
    public void destroy() {
    public void init(FilterConfig arg0) throws ServletException {
    Please let me know your feedback.

  • I can't download powerpoint files from emails on my ipad

    I can see the powerpoint file in the email, but it won't download. Same for ppt and ppx files. I've downloaded keynote, but no change.  It's a new thing as I have downloaded ppt files in the past. Size doesn't appear to be an issue as I can't open a 'single slide' attachment either. When you tap on the file, it thinks about it for a while and then nothing happens. Can anyone help? I tried the Apple store, but they can't. Am at a loss.

    How are you trying to access the powerpoint?  I know you said this worked in the past but just trying to get some additional info here.
    Are you using the native email app on the iPad or logging in to a web-based email program?  If using the native app, can you login to a web-based email and try opening the powerpoint in that manner to see if it works?
    If so, it's an issue with the email program and would help narrow down the issue.

  • Printing (flattening) a PDF'd powerpoint file

    Hello.
    I work in a Uni print room and get bombarded with lots of printing problems so i thought i would share this one and see if it is common or if there's any advice that could help.
    I was sent a powerpoint file that has been converted to a PDF (i don't know what settings converted it i'm afraid) and people have been struggling to print it. It is less than 1mb in size and is a fairly simple powerpoint file made up of about 20 slides with text and master slide graphic that appears to be nothing out of the ordinary.
    When it is sent to print it takes ages to flatten and get to the printer. I flattened the file using acrobat pro 9 and the file, once it eventually finished had grown from less than 1mb to over 350mb!
    Anyway, i was hoping someone could shed some light on why this is happening to something as basic as a converted powerpoint file. Any advice will be greatfully recieved. I've read that it could be something to do with transparencies flattening, if that's helpful.
    many thanks in advance.
    Chris

    Thanks for replying Bill,
    I don't have the original Powerpoint file i'm afraid. The reason this is a concern is that the Uni has a new online area where lecturers can put work up for students to get to. It appears everything must be PDF on there.
    Well, i had a bit of a play and found i was able to flatten the file to a 3mb file by putting it on "low resolution" and dropping the "raster/vector" setting to "0".
    This isn't ideal but atleast it means we can print the file.
    Attached is the first page of the original PDF.  http://www.megaupload.com/?d=FHII77RR (hope this link is ok to use)
    I believe that the problem is coming from the grey slide graphic on the left. It actually appears to go all the way across the page, as when flattening i can see the page loading and see this grey pattern covers all the page. Hope that makes sense.
    Thanks again
    Chris

  • How to OPEN MS PowerPoint files from my Droid RAZA phone

    Hi There,
         Is there any way to OPEN the attached Microsoft Office PowerPoint files with the emails I received?
         I appreciate all your help and suggestions in advance.
         Thank you very much,
    Best,
    ylwny01

    Have you checked the Google Play Store to see if there is an application capable of viewing PowerPoint files?
    This result took all of two seconds.
    https://play.google.com/store/apps/details?id=com.dataviz.docstogo

  • After 7.01 upgrade, can't open PowerPoint files from Mail

    After updating 4th gen iPad to iOS 7.01, PowerPoint slides attached to emails won't open.  Prior to the upgrade, I could double click on a PowerPoint attachment, which would proceed to download and then open it.  It also will not open in Quickoffice either.

    Thanks for the response but I think you've misunderstood the problem. I can not open any type of PowerPoint file off my server in keynote. This includes .ppt and .pptx files. (Also includes .doc, .docx, .xls, .xlsx in pages and numbers).
    Even if what you said worked it would take forever to go through every file and save them all as ppt 2007. Plus of course, I don't know what files I will need when. There are hundreds of resources I need to access when I'm at home. I need the flexibility to view the files when i need to and on the go. Normally I can download them off my school network on to my iPad in keynote and edit them then I email them back to myself ready to use the next day or to save back to my network. Currently I can not download any Microsoft office file. So I am now forced to have to lug my laptop home everyday, rendering my iPad and iMac useless. I can't pre-empt what I'll need and save it as .ppt as that is completely inflexible and that won't open anyways as this is not an issue with the version of PowerPoint file. This is an issue with how all Microsoft files are downloading from my school network to my iPad and iMac. I want Apple to allow this to work like it used to before the upgrades in operating systems. I wish I hadn't upgraded as it worked perfectly. :(

  • How to delete files from an attached camera after downloading?

    New to Aperture 2. I am sure to have a lot of exploring to do but for now I am looking for a way to delete files from an attached camera after downloading like you can with iPhoto. Is this possible?

    While I might be a bit paranoid, I prefer to format in the camera after verifying that the import came out OK. It is a small price to pay to make sure that my images are actually on the computer. I don't do anything fancy, just make sure that the thumbnails come up correctly, and maybe perform an edit.
    While it was not my images, thank goodness, I did get bit in a similar fashion. I use a "watch fob" style GPS unit for Geocoding. I have hoodahgeo configured to delete my tracks after import. Well, after one session I forgot to update my images with the gps information. As you can guess, when I re-opened HoodahGeo to try and re-geotag, the tracks were gone, so I was out of luck.

  • Can't open powerpoint files in keynote since Mountain Lion upgrade

    Not having much luck and not sure which forum to post in as this could be a Mountain Lion issue, an iWork issue, but is also an iWork and/or IOS6 issue!
    Until last week I had Lion on iMac and IOS5 on iPad. I was able to log on to my work network server (school network, I am a teacher) and open powerpoint, word or excel files in keynote, pages or numbers on my iPad. I then upgraded to IOS6 and now none of the files will open up on my iPad. I get the open in screen when I choose a file to open, then nothing happens.
    In the meantime, I upgraded my iMac from Lion to Mountain Lion. Since I was having problems accessing my work files and viewing them on my iPad, I decided to buy Keynote on my iMac in the hope that I could get on with some work on iMac rather than iPad. I logged on to my school server and tried to open a powerpoint file and for some reason it downloads it as a pptx.exe and if I try to open it I get an error message saying "You can't open the application xxx.pptx.exe because Microsoft Windows applications are not supported on OSX". It shouldn't be a .exe file it should just be a powerpoint file! When I open Keynote and look for available files on my iMac, the file I just downloaded is greyed out.
    Hmmmmm so I have an iMac, an iPad, two versions of the Keynote app (plus numbers and pages on the ipad) and can't open any of my files from my school network. That seems a lot of money in one pot Apple and something has changed from Lion to Mountain Lion, and from IOS5 to IOS6 which is preventing me from doing my work. IOS5 allowed me to open any ppt, xls, doc, pptx, xlsx, docx file from my school network so why since upgrading to IOS6 can I suddenly not open them??
    Now having forked out for Keynote on my iMac, I have the same problem.
    I am able to open attachments in emails and I am able to log on to the school VLE and access and open files. So it is just something to do with opening from the normal file system that I can't do.
    I posted in the iPad and iWork forum and had no replies. However, Apple iWork team have contacted me after reading my post re the iPad issue of opening files from my network. I've provided info to them and am waiting for a response, but in the meantime I have now discovered there is also an issue on my iMac. Hopefully they will read this too or someone else will perhaps know what is going on.
    It is a worry that I can't do any work using my Apple products seeing as I have bought them! I have had to go back to bringing my windows laptop home everyday which I hope is a short term solution. I have loved the fact that I could access everything on my school network from my iPad in the past and not have to drag a laptop around. I am also worried that this means pupils can't access the files too if they are using Macs, iphones, ipads etc and have upgraded to Mountain Lion or IOS6.
    Hoping someone can help
    Thanks in advance

    Thanks for the response but I think you've misunderstood the problem. I can not open any type of PowerPoint file off my server in keynote. This includes .ppt and .pptx files. (Also includes .doc, .docx, .xls, .xlsx in pages and numbers).
    Even if what you said worked it would take forever to go through every file and save them all as ppt 2007. Plus of course, I don't know what files I will need when. There are hundreds of resources I need to access when I'm at home. I need the flexibility to view the files when i need to and on the go. Normally I can download them off my school network on to my iPad in keynote and edit them then I email them back to myself ready to use the next day or to save back to my network. Currently I can not download any Microsoft office file. So I am now forced to have to lug my laptop home everyday, rendering my iPad and iMac useless. I can't pre-empt what I'll need and save it as .ppt as that is completely inflexible and that won't open anyways as this is not an issue with the version of PowerPoint file. This is an issue with how all Microsoft files are downloading from my school network to my iPad and iMac. I want Apple to allow this to work like it used to before the upgrades in operating systems. I wish I hadn't upgraded as it worked perfectly. :(

  • Problem in opening an image file sent as attachment in mail

    Hi Friends,
    I have a requirement of sending a image file (.jpg) through email attachment.
    I am getting the attachment using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    But i am unable to open the file in the attachment. It is givin a message 'CAN'T DETERMINE TYPE'.
    Can you please provide me a solution .
    Regards,
    pooja

    Read the JPG file as Binary (TYPE BIN) in your read? and write it to the OBJBIN table?
    done in the OPEN
      REFRESH w_objbin.
      OPEN DATASET attach FOR INPUT IN BINARY MODE MESSAGE t_mesg.
      IF sy-subrc NE 0.
        WRITE:/ 'Attachment Dataset Open RC ',sy-subrc.
        WRITE:/ 'Message ',t_mesg.
        EXIT.
      ENDIF.
      DO.
        READ DATASET attach INTO wk_rec.
        IF sy-subrc NE 0.
          IF sy-subrc NE 4.
            WRITE:/ 'Attach Dataset Read RC ',sy-subrc.
            WRITE:/ 'Message ',t_mesg.
          ENDIF.
          EXIT.
        ENDIF.
        w_objbin-line = wk_rec.
        APPEND w_objbin.
      ENDDO.
      DESCRIBE TABLE w_objbin LINES w_tab_lines.
      LOOP AT w_objbin INTO wk_rec.
        APPEND wk_rec TO i_objbin.
      ENDLOOP.
    Edited by: Paul Chapman on Jun 5, 2008 10:46 AM

  • Need Help ASAP  my State tax form is in a PDF file and the attachment in my email says Please wait

    Need Help ASAP  my State tax form is in a PDF file and the attachment in my email says Please wait...
    I tried downloading updates like it said to but it still will not display the document.  How do I print the PDF file ASAP

    Can you give us a LOT more info?
    What email client? What version of Reader (I can only assume you even have Reader at this point)?
    Please wait? I'm sure it says more than that, right?
    Have you tried simply saving the PDF (it IS a PDF correct?) to your desktop and opening it from there?
    Did you get this form from the IRS or did it come from somewhere else? If the IRS again, what version of Reader?
    Help us help you.

  • How can I edit a file which is attached in a pdf file?

    I want to edit a bmp image file which is attached in a pdf file. I have Adobe Acrobat Professional installed. Actually, I have two questions.
    1 How can I change the default viewer of bmp file into Mspaint?
    2 Can I edit it in Mspaint and save it directly?

    1
    open windows explorer and find a .bmp
    right click
    select open with
    choose the program you want from the list
    - or navigate to program if not in list
    check the box that says always use this program
    2
    never tried, don't know

  • Using an external drive with shared files (iPhoto, iTunes), attached to a Time Capsule, can the contents of the external drive be backed-up to the internal Time Capsule drive? Perhaps a RAID1 mirror to a partition?

    Using an external drive with shared files (iPhoto, iTunes), attached to a Time Capsule, can the contents of the external drive be backed-up to the internal Time Capsule drive? Perhaps a RAID1 mirror to a partitioned Time Capsule? I understand that the Time Machine (software) cannot backup a networked drive (the external) and that Time Capsule (the router/wireless hard drive) does not have its own backup software... so it won't backup the connected drive. What I would like is an alternate solution for having an automated backup of a networked drive. A 2TB Time Capsule has more than enough space for Time Machine backups of my family of Macbooks, so I had hoped to mirror a 500GB external drive (with shared media files) to a portion of the Time Capsule internal hard drive. I assume this would require a partition of the Time Capsule drive. If not, would the sparse file from the various computers being backed up need to be copied to the external drive as part of the RAID1 setup? This seems like overkill for the Time Machine backup, but it would cover the media files.  

    The complexity with this idea is the software has to run from a Mac computer on your network.. so you need a Mac turned on, probably most of the day.
    It isn't possible to partition the TC although you can create a image area.
    The software would have to copy the material, that means all files to be copied, go from USB drive, back to the Mac, then back to the TC, and written to the drive. In other words you have just added Network congestion, although a proper incremental backup type software will not actually use a lot of capacity.
    Finally it will be slow.. network drives are slower than internal drives. Well USB connected drive is much slower than the same drive connected directly to the computer.. and if the drive is connected directly to a computer it can be shared with the network.
    http://www.anandtech.com/show/4577/airport-extreme-5th-gen-and-time-capsule-4th- gen-review-faster-wifi-/4
    Read carefully the speed of the USB drive plugged into the TC.

  • How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    You can certainly use iWork, though I hesitate to recommend it to a seasoned Windows user simply because it would add another level of the unfamiliar with which you would have to gain familiarity. The iWork applications are certainly very competent and in most respects both easy to use and surprisingly powerful. They are not 100% compatible however, though that typically manifests itself in document formatting issues rather than anything more significant.
    I have never attempted to import emails from a Windows system into MacOS - other than in Outlook connected to an Exchange server, thus not really an issue at all. I doubt that the Mail app in MacOS can import directly, but of course you could always set the account(s) up on the Mac and then forward emails you want to keep from the PC. Not elegant, but it works. Virtually any Windows document or file, whichever application created it, can be opened or converted for use on a Mac, and using both systems on my desk each day I rarely see any issues switching stuff from one machine to the other. You may stumble over one or two issues, but likely not significant.
    In switching platforms there will be some inevitable issues, not so much with being able to import your stuff because there's usually a workaround or a utility that can help, but just with getting familiar with the platform and the differences between Windows and MacOS that can obscure their similarities. From time to time the support community here hears from a user who has found the migration very problematic and regrets it, but for the most part the phrase 'I should have done this years ago...' is rather more prevalent!

  • Converting a Keynote document to Powerpoint file doesn't work

    I tried to convert Keynote documents to PowerPoint files that can be viewed and edited by PowerPoint users on Windows or Mac OS computers. All I got was a error. Can any one tell me how to make this work.I did every thing that was in the instructions.
    To create a PowerPoint slideshow:
    Choose File > Export and then click PowerPoint.
    Click Next.
    Type a name and choose a location for the file, and then click Export.

    Hy Kyn, thank you for answering.
    Every slide on my presentation has animated objekts. And every slide is linked (by hyperlink) to every slide on the presentation. So I want to give the user the chance to interrupt and to go to next slide. Therefore is an arrow to klick on, which has a hyperlink to next side (or do go to start, or to go back) - during the slide-animation is working.
    That works fine in keynote, but it doesn't work after the export in QT. In QT it is not possible to interrupt the sequence of the animation. When the sequence is (performed) finalized, the klick on the arrow works, and I can go to next slide.
    But interruption is not pssible.
    Tanks in advance for your answer!
    Best regards - Renate

  • How to send PDF file as an attachment in email?

    Hi Folks,
    I have successfully configured SMTP and by now I can successfully send normal text messages along with .TXT files. However, when I am trying to send an email along with .pdf file as an attachment, I am getting the mail in my inbox, but I cannot open the .pdf file! I am getting the following Acrobat error:
    Acrobat could not open 'abc.pdf' because it is either not a supported file type or because the file has been corrupted
    Can any help me in solving this problem?
    Thanks in advance
    Regards,
    Faisal

    Hi Vajha,
    Thanks alot for your kind reply. I also express my apologies for responding to your reply lately.
    I beleive all the links you have sent me are talking about ABAP coding. what I am interested in is,
    is there any configuration that I am missing in SCOT (Basis side)?
    Since I am not an ABAPER, so I carry out these activities.
    Can anyone please answer the following queries of mine:
    1. Can't we send any PDF attachment in a mail from R/3?
    2. Do we have to do it through coding only?
    3. In scot we have option "All formats except fllw". But it does not work for me. Any inputs?
    Thanks in advance.
    Regards,
    Faisal

Maybe you are looking for