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 <kgh...@gmail.com> 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 google-appengine-java@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