Re: can't attach text with mail using Google App engine? please help me

2011-09-14 Thread John
I didn't get any exception.  please help me. I have been waiting for
your reply for the past 8 hours.

This is My Google App Engine Log:

2011-09-13 20:47:12.758 /mailserver 200 79ms 46cpu_ms 0kb Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902
Firefox/3.6.22

59.92.6.102 - - [13/Sep/2011:08:17:12 -0700] POST /mailserver HTTP/
1.1 200 0 http://dinefinemail.appspot.com/; Mozilla/5.0 (Windows;
U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22
dinefinemail.appspot.com ms=80 cpu_ms=47 api_cpu_ms=0
cpm_usd=0.301408 instance=00c61b117ce578ca700cf428ae7f9245e72200

I 2011-09-13 20:47:12.708

[s~dinefinemail/1.353217802270349484].stdout: Mail Servlet is





On Sep 13, 9:11 pm, skly kvk...@gmail.com wrote:
 You can print  the exceptions to view details

 2011/9/13 John gan.tan...@gmail.com

  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 towww.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));
                 msg.addRecipient(Message.RecipientType.TO, new
  InternetAddress(gan.tan...@gmail.com));

                 msg.setSubject(Invitation fromwww.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 Web Toolkit group.
  To post to this group, send email to google-web-toolkit@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



can't attach text with mail using Google App engine? please help me

2011-09-13 Thread John
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(rajaganapathiv...@gmail.com));
msg.addRecipient(Message.RecipientType.TO, new
InternetAddress(gan.tan...@gmail.com));

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 Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: can't attach text with mail using Google App engine? please help me

2011-09-13 Thread skly
You can print  the exceptions to view details

2011/9/13 John gan.tan...@gmail.com

 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(rajaganapathiv...@gmail.com));
msg.addRecipient(Message.RecipientType.TO, new
 InternetAddress(gan.tan...@gmail.com));

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 Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.