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.

Reply via email to