I'm trying to attach a plain text file to a email.  Can anyone see why this 
is not working?


Multipart mp = new MimeMultipart();
                        
                  MimeBodyPart attachment = new MimeBodyPart();
                        String data = " attached file data";
                        
                        DataSource ds = new ByteArrayDataSource(data, 
"text/plain");
                        attachment.setDataHandler(new DataHandler(ds));
                        attachment.setFileName("monthly_payments.txt");
                        mp.addBodyPart(attachment);
                        
                        msg.setContent(mp);
                        Transport.send(msg);

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

Reply via email to