I don't think you'll be able to do this, and wait for an answer of any Googler about it is to wait a "no". So far as I know, this kind of feature isn't pretty common and could lead to something undesired, try another approach or to use something outside appengine. :P
*Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Fri, Jul 15, 2011 at 6:38 AM, Zbój <[email protected]> wrote: > I'm having the same problem. The sender of the email is the user who's > currently signed in and I'm getting this exception too. Sending emails > from admin accounts works without problems. > > > On Jul 13, 8:33 am, kghate <[email protected]> wrote: > > The documentationhttp:// > code.google.com/appengine/docs/java/mail/overview.htmlclearly states > > the following > > > > *For security purposes, the sender address of a message must be the email > > address of an administrator for the application, the Google Account email > > address of the current user who is signed in, or any valid email > receiving > > address for the app (see Receiving Mail< > http://code.google.com/appengine/docs/java/mail/overview.html#Receivi.. > .>). > > The message can also include a "reply to" address, which must also meet > > these restrictions.* > > > > In my use case, we want the email to be sent from the email address of > the > > current user who is signed in, and not via any email that is in the > > permissions list. The administrator emails (listed in the permissions > list) > > are being sent successfully, no issues there. > > > > I am using UserService to get the current user's email information > > > > UserService userService = UserServiceFactory.getUserService(); > > if (userService.isUserLoggedIn()) { > > msg.setFrom(new InternetAddress(userService.getCurrentUser().getEmail(), > > from));}else{ > > > > // request user to login so that email can be sent > > > > > > > > > > > > > > > > } > > -- > 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. > > -- 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.
