thx for advice, now i get another exception. code now on this pic
http://www.student.uni-oldenburg.de/piotr.listewnik/mail/mail1.png i got now a "MessagingException", the jars should be at the correct place now i guess. regards On 19 Mrz., 10:31, FrugoFrog <[email protected]> wrote: > Do you have mail and activation jars in WEB-INF/lib ? > > 2011/3/18 antrox <[email protected]>: > > > > > Hello, > > > this is what i tried for testing only. > > > have a look please, pretty simple i guess. > > > I made a Button which performs this: > > > public void sendmail(){ > > rpcService.sendingnow(new AsyncCallback<Boolean>() { > > public void onSuccess(Boolean result) { > > } > > .... > > } > > > public Boolean sendingnow(){ > > try { > > sendingnow2(); > > } catch (UnsupportedEncodingException e) { > > e.printStackTrace(); > > } > > return true; > > } > > > public void sendingnow2() throws UnsupportedEncodingException{ > > Properties props = new Properties(); > > Session session = Session.getDefaultInstance(props, null); > > > String msgBody = "kk works"; > > > try { > > Message msg = new MimeMessage(session); > > msg.setFrom(new > > InternetAddress("[email protected]", "lol")); > > msg.addRecipient(Message.RecipientType.TO, > > new > > InternetAddress("piotr.listewnik@uni- > > oldenburg.de", "kkk")); > > msg.setSubject("funktioiert!"); > > msg.setText(msgBody); > > Transport.send(msg); > > > } catch (AddressException e) { > > } catch (MessagingException e) { > > } > > } > > > ___________ > > > this is the error i get: > > > [WARN] Exception while dispatching incoming RPC call > > com.google.gwt.user.server.rpc.UnexpectedException: Service method > > 'public abstract java.lang.Boolean swp.client.LCService.sendingnow()' > > threw an unexpected exception: com.google.apphosting.api.ApiProxy > > $CallNotFoundException: The API package 'mail' or call 'Send()' was > > not found. > > > First of all. Am I doing it correctly? And i really dont know how to > > include another Library, this is the problem i think. > > > how can i fix it? > > > tank you. > > > best regards > > > On 14 Mrz., 06:21, wingdings <[email protected]> wrote: > >> To send anemailmessage, an app prepares a MimeMessage object, then sends > >> it with the static method send() on the Transport class. The message is > >> created using a JavaMail Session object. The Session and the Transport work > >> with the App Engine Mail service without any additional configuration. > > >> import java.util.Properties; > > >> import javax.mail.Message; > >> import javax.mail.MessagingException; > >> import javax.mail.Session; > >> import javax.mail.Transport; > >> import javax.mail.internet.AddressException; > >> import javax.mail.internet.InternetAddress; > >> import javax.mail.internet.MimeMessage; > > >> // ... > >> Properties props = new Properties(); > >> Session session = Session.getDefaultInstance(props, null); > > >> String msgBody = "..."; > > >> try { > >> Message msg = new MimeMessage(session); > >> msg.setFrom(new InternetAddress("[email protected]", > >> "Example.com Admin")); > >> msg.addRecipient(Message.RecipientType.TO, > >> new InternetAddress("[email protected]", "Mr. > >> User")); > >> msg.setSubject("Your Example.com account has been activated"); > >> msg.setText(msgBody); > >> Transport.send(msg); > > >> } catch (AddressException e) { > >> // ... > >> } catch (MessagingException e) { > >> // ... > >> } > > >> watch outhttp://code.google.com/appengine/docs/java/mail/usingjavamail.html > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, sendemailto [email protected]. > > To unsubscribe from this group, sendemailto > > [email protected]. > > For more options, visit this group > > athttp://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 [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-web-toolkit?hl=en.
