Home > Default > PowerPoint file as an attachment

PowerPoint file as an attachment

October 11Hits:0
Advertisement
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.

Answers

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.

Read other 2 answers

Tags:

Related Articles

  • PowerPoint file as an attachmentOctober 11

    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&

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

    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 no

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

    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

  • Printing (flattening) a PDF'd powerpoint fileOctober 11

    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

  • How to OPEN MS PowerPoint files from my Droid RAZA phoneOctober 11

    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, ylwny01Have you checked the Google Play Sto

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

    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

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

    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

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

    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 serv

  • Problem in opening an image file sent as attachment in mailOctober 11

    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

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

    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 ASAPCan you give us a LOT more

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 1.617 s.