I don't know what mistake i did in the server side code of google app
engine, I send my code segment to you. Thanks for advance .
//server side 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("[email protected]"));
msg.addRecipient(Message.RecipientType.TO, new
InternetAddress("[email protected]"));
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 [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-java?hl=en.