Dear Sir/Madam,
      I am Manoj Kumar working in a software company. we are accessing  the 
services from  google app engine in our project. we are registered with
google co-operation.Sir, When i am trying to mail the  pdf file  using "
https://developers.google.com/appengine/docs/java/mail/usingjavamail"; docs 
, Mail is not sending (No error 
coming while compilation ). 

This is given code:

import javax.activation.DataHandler;
import javax.mail.Multipart;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMultipart;

// ...
        String htmlBody;        // ...
        byte[] attachmentData;  // ...

        Multipart mp = new MimeMultipart();

        MimeBodyPart htmlPart = new MimeBodyPart();
        htmlPart.setContent(htmlBody, "text/html");
        mp.addBodyPart(htmlPart);

        MimeBodyPart attachment = new MimeBodyPart();
        attachment.setFileName("manual.pdf");
        attachment.setContent(attachmentData, "application/pdf");
        mp.addBodyPart(attachment);

        message.setContent(mp);




If We send the attachment Data Directly as a String 

      String Str="Hi , Testing! ";

  attachment.setContent(Str, "application/pdf");



then ,

      Pdf file is attached to mail, But when i am opening that file after 
download , giving error "Unable to open document . File type plain text 
document (text/plain) is not supported"


please let us know ,How to  mail pdf file as attachment using google
 app engine.

---
Thanks and Regards
S.Manoj Kumar,
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to