On Jul 14, 8:17 pm, thebrianschott <[email protected]> wrote:
> Regarding #1:
> I am storing it in the datastore because I want the logged-in user
> user to be able to opt for a different email address -- only one, not
> more. So isn't it Ok to use the datastore for that.
It's impossible for the application to send a message from an address
other than the one actually associated with the account the user used
to login. If you don't get the address from the User object at the
same time you're sending the message, it will always throw an
exception if the address in the datastore doesn't match that address
(with the added negative side effect that the datastore fetch is going
to be slower than getting the only address that will work directly
from the User object).
> Regarding #2:
> Aren't I doing exactly that, but in two steps in my code snippet?
> step 1: user = users.get_current_user()
> step 2: address = user.email()
> (This may be a stupid assertion, but I am a python novice.)
Yes, you're getting the correct address at the time you write it to
the datastore, but it's not clear that you're using the correct
address at send-time.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---