The documentation 
http://code.google.com/appengine/docs/java/mail/overview.html clearly 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#Receiving_Mail>).
 
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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/BThNaNeI3r0J.
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