Re: [appengine-java] Re: can't send attachment via Java Mail API supported by GAE

2010-02-11 Thread seleronm
Hi.

It is great. 

I was able also to receive attached mail. 

Congratulations. 

Thanks everything is working now. Now attachment is working.

Flex base video to image capture application hosted on google app
engine

http://clickpicture.appspot.com/Video.html

 Hi.

 I'm sorry for being not able to explain well.
 Please try the following sources.

 code

 MimeMessage msg = new MimeMessage(session);

 Multipart mp = new MimeMultipart();

 //attachmentPart
 MimeBodyPart attachment = new MimeBodyPart();
 attachment.setFileName(videoimage.jpeg);
 ByteArrayDataSource byteArrayDataSource = new
 ByteArrayDataSource(theByteArray, image/jpeg);
 javax.activation.DataHandler datahandler = new
 javax.activation.DataHandler(byteArrayDataSource);
 attachment.setDataHandler(datahandler);
 mp.addBodyPart(attachment);

 //MessagePart(body)
 MimeBodyPart body = new MimeBodyPart();
 body.setText(Message_sample); //set message
 mp.addBodyPart(body);

 msg.setContent(mp);

 msg.setFrom(fromIaddress); // set from
 msg.addRecipient(Message.RecipientType.TO, toIaddress); // set to
 msg.setSubject(subject_sample); //set subject

 Transport.send(msg);

 /code

 I confirm that I received in Gmail.

 If it is useless in this method
 The value of theByteArray might have to be confirmed.

 thanks.

 2010/2/5 Nehul neh...@gmail.com:



  Can you please explain what you mean?

  Hi.

  I think that I can transmit if it is shape that stores
  msg and attachement in each Part

  Please try.
  thanks.

  Multi-Part Messages

  I can't send attachment (simple image file) to email but normal text
  email is working.

  code
  (session);


-- 
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-j...@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.

-- 
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-j...@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.



[appengine-java] Re: can't send attachment via Java Mail API supported by GAE

2010-02-10 Thread Nehul
Thanks everything is working now. Now attachment is working.

Flex base video to image capture application hosted on google app
engine

http://clickpicture.appspot.com/Video.html

On Feb 5, 7:59 am, m seleron seler...@gmail.com wrote:
 Hi.

 I'm sorry for being not able to explain well.
 Please try the following sources.

 code

 MimeMessage msg = new MimeMessage(session);

 Multipart mp = new MimeMultipart();

 //attachmentPart
 MimeBodyPart attachment = new MimeBodyPart();
 attachment.setFileName(videoimage.jpeg);
 ByteArrayDataSource byteArrayDataSource = new
 ByteArrayDataSource(theByteArray, image/jpeg);
 javax.activation.DataHandler datahandler = new
 javax.activation.DataHandler(byteArrayDataSource);
 attachment.setDataHandler(datahandler);
 mp.addBodyPart(attachment);

 //MessagePart(body)
 MimeBodyPart body = new MimeBodyPart();
 body.setText(Message_sample); //set message
 mp.addBodyPart(body);

 msg.setContent(mp);

 msg.setFrom(fromIaddress); // set from
 msg.addRecipient(Message.RecipientType.TO, toIaddress); // set to
 msg.setSubject(subject_sample); //set subject

 Transport.send(msg);

 /code

 I confirm that I received in Gmail.

 If it is useless in this method
 The value of theByteArray might have to be confirmed.

 thanks.

 2010/2/5 Nehul neh...@gmail.com:



  Can you please explain what you mean?

  On Feb 4, 6:38 am, seleronm seler...@gmail.com wrote:
  Hi.

  I think that I can transmit if it is shape that stores
  msg and attachement in each Part

  Please try.
  thanks.

  Multi-Part Messages

  I can't send attachment (simple image file) to email but normal text
  email is working.

  code
                              MimeMessage msg = new MimeMessage
  (session);

                          Multipart mp = new MimeMultipart();

                          MimeBodyPart attachment = new MimeBodyPart();
                          attachment.setFileName(videoimage.jpeg);
                          attachment.setContent(theByteArray, image/jpeg);
                          attachment.setText(request.getParameter(msg));

                          mp.addBodyPart(attachment);
                          msg.setContent(mp);

                          msg.setFrom(new InternetAddress
  (neh...@gmail.com,Reply to));
                          msg.addRecipient(Message.RecipientType.TO, new
  InternetAddress(toe,1.3 users));
                          msg.setSubject(request.getParameter(subject));

                          Transport.send(msg);
  /code

  I am using GAE 1.3.0 for Java.

  --
  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to google-appengine-java+
  unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-
  appengine-java?hl=en.

  --
  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-appengine-java+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
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-j...@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.



[appengine-java] Re: can't send attachment via Java Mail API supported by GAE

2010-02-07 Thread Nehul
Thanks I think my value of ByteArray is not right. I will add blazeDS
to get data from flex to gae. I will post result.

On Feb 5, 7:59 am, m seleron seler...@gmail.com wrote:
 Hi.

 I'm sorry for being not able to explain well.
 Please try the following sources.

 code

 MimeMessage msg = new MimeMessage(session);

 Multipart mp = new MimeMultipart();

 //attachmentPart
 MimeBodyPart attachment = new MimeBodyPart();
 attachment.setFileName(videoimage.jpeg);
 ByteArrayDataSource byteArrayDataSource = new
 ByteArrayDataSource(theByteArray, image/jpeg);
 javax.activation.DataHandler datahandler = new
 javax.activation.DataHandler(byteArrayDataSource);
 attachment.setDataHandler(datahandler);
 mp.addBodyPart(attachment);

 //MessagePart(body)
 MimeBodyPart body = new MimeBodyPart();
 body.setText(Message_sample); //set message
 mp.addBodyPart(body);

 msg.setContent(mp);

 msg.setFrom(fromIaddress); // set from
 msg.addRecipient(Message.RecipientType.TO, toIaddress); // set to
 msg.setSubject(subject_sample); //set subject

 Transport.send(msg);

 /code

 I confirm that I received in Gmail.

 If it is useless in this method
 The value of theByteArray might have to be confirmed.

 thanks.

 2010/2/5 Nehul neh...@gmail.com:



  Can you please explain what you mean?

  On Feb 4, 6:38 am, seleronm seler...@gmail.com wrote:
  Hi.

  I think that I can transmit if it is shape that stores
  msg and attachement in each Part

  Please try.
  thanks.

  Multi-Part Messages

  I can't send attachment (simple image file) to email but normal text
  email is working.

  code
                              MimeMessage msg = new MimeMessage
  (session);

                          Multipart mp = new MimeMultipart();

                          MimeBodyPart attachment = new MimeBodyPart();
                          attachment.setFileName(videoimage.jpeg);
                          attachment.setContent(theByteArray, image/jpeg);
                          attachment.setText(request.getParameter(msg));

                          mp.addBodyPart(attachment);
                          msg.setContent(mp);

                          msg.setFrom(new InternetAddress
  (neh...@gmail.com,Reply to));
                          msg.addRecipient(Message.RecipientType.TO, new
  InternetAddress(toe,1.3 users));
                          msg.setSubject(request.getParameter(subject));

                          Transport.send(msg);
  /code

  I am using GAE 1.3.0 for Java.

  --
  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to google-appengine-java+
  unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-
  appengine-java?hl=en.

  --
  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-appengine-java+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
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-j...@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.



Re: [appengine-java] Re: can't send attachment via Java Mail API supported by GAE

2010-02-05 Thread m seleron
Hi.

I'm sorry for being not able to explain well.
Please try the following sources.

code

MimeMessage msg = new MimeMessage(session);

Multipart mp = new MimeMultipart();

//attachmentPart
MimeBodyPart attachment = new MimeBodyPart();
attachment.setFileName(videoimage.jpeg);
ByteArrayDataSource byteArrayDataSource = new
ByteArrayDataSource(theByteArray, image/jpeg);
javax.activation.DataHandler datahandler = new
javax.activation.DataHandler(byteArrayDataSource);
attachment.setDataHandler(datahandler);
mp.addBodyPart(attachment);

//MessagePart(body)
MimeBodyPart body = new MimeBodyPart();
body.setText(Message_sample); //set message
mp.addBodyPart(body);

msg.setContent(mp);

msg.setFrom(fromIaddress); // set from
msg.addRecipient(Message.RecipientType.TO, toIaddress); // set to
msg.setSubject(subject_sample); //set subject

Transport.send(msg);

/code


I confirm that I received in Gmail.

If it is useless in this method
The value of theByteArray might have to be confirmed.

thanks.


2010/2/5 Nehul neh...@gmail.com:
 Can you please explain what you mean?

 On Feb 4, 6:38 am, seleronm seler...@gmail.com wrote:
 Hi.

 I think that I can transmit if it is shape that stores
 msg and attachement in each Part

 Please try.
 thanks.



 Multi-Part Messages

 I can't send attachment (simple image file) to email but normal text
 email is working.

 code
                             MimeMessage msg = new MimeMessage
 (session);

                         Multipart mp = new MimeMultipart();

                         MimeBodyPart attachment = new MimeBodyPart();
                         attachment.setFileName(videoimage.jpeg);
                         attachment.setContent(theByteArray, image/jpeg);
                         attachment.setText(request.getParameter(msg));

                         mp.addBodyPart(attachment);
                         msg.setContent(mp);

                         msg.setFrom(new InternetAddress
 (neh...@gmail.com,Reply to));
                         msg.addRecipient(Message.RecipientType.TO, new
 InternetAddress(toe,1.3 users));
                         msg.setSubject(request.getParameter(subject));

                         Transport.send(msg);
 /code

 I am using GAE 1.3.0 for Java.

 --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to google-appengine-java+
 unsubscr...@googlegroups.com.
 For more options, visit this group athttp://groups.google.com/group/google-
 appengine-java?hl=en.

 --
 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-j...@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.



-- 
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-j...@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.



[appengine-java] Re: can't send attachment via Java Mail API supported by GAE

2010-02-04 Thread Nehul
Can you please explain what you mean?

On Feb 4, 6:38 am, seleronm seler...@gmail.com wrote:
 Hi.

 I think that I can transmit if it is shape that stores
 msg and attachement in each Part

 Please try.
 thanks.



 Multi-Part Messages

 I can't send attachment (simple image file) to email but normal text
 email is working.

 code
                             MimeMessage msg = new MimeMessage
 (session);

                         Multipart mp = new MimeMultipart();

                         MimeBodyPart attachment = new MimeBodyPart();
                         attachment.setFileName(videoimage.jpeg);
                         attachment.setContent(theByteArray, image/jpeg);
                         attachment.setText(request.getParameter(msg));

                         mp.addBodyPart(attachment);
                         msg.setContent(mp);

                         msg.setFrom(new InternetAddress
 (neh...@gmail.com,Reply to));
                         msg.addRecipient(Message.RecipientType.TO, new
 InternetAddress(toe,1.3 users));
                         msg.setSubject(request.getParameter(subject));

                         Transport.send(msg);
 /code

 I am using GAE 1.3.0 for Java.

 --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to google-appengine-java+
 unsubscr...@googlegroups.com.
 For more options, visit this group athttp://groups.google.com/group/google-
 appengine-java?hl=en.

-- 
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-j...@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.