I want to attach the text on mail using Googl App Engine. I send my code segment What mistake i done. please help me.
//serverside code. public class MailServlet extends HttpServlet { private static final long serialVersionUID = 1L; public void doPost(HttpServletRequest req, HttpServletResponse resp) { Properties properties = new Properties(); Session session = Session.getDefaultInstance(properties, null); String message = "Welcome to www.datastoregwt.com"; String attachement = "attachementString for testing" ; try { Message msg = new MimeMessage(session); Multipart mp = new MimeMultipart(); MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(attachement, "text/plain"); mp.addBodyPart(bodyPart); msg.setFrom(new InternetAddress("rajaganapathiv...@gmail.com", "Rajaganapathi velayutham")); msg.addRecipient(Message.RecipientType.TO, new InternetAddress("j...@searchterrain.com", "J.Ganesan")); msg.setSubject("Invitation from www.datastoregwt.com"); msg.setText(message); msg.setContent(mp); Transport.send(msg); } catch (AddressException e1) { } catch (MessagingException e2) { } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } } -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.