Hello, In my application, I have a 'Contact Us' page for my users to fill in if they want to send any feedback to me. It requiers the user to fill in a number of fields and to provide his/her email address. A button 'Send' is used to send the user's filled form to me.
I am using the mail api to perform this task. The problem is: my application only accepts the administrator email address. It does not check (as is documented if the user is signed in or not then redirect him to sign in and back to my application url) My code looks like this: class ContactusHandler (webapp.RequestHandler): @login_required def __init__(self): webapp.RequestHandler.__init__(self) self.methods = ContactusMethods() def get(self): func = None action = self.request.get('action') args = () while True: key = 'arg%d' % len(args) val = self.request.get(key) if val: args = (simplejson.loads(val),) else: break result = func(*args) self.response.out.write(simplejson.dumps(result)) #---------------------------------------------------------------------------------------------- class ContactusMethods: def Contactus(self, *args): FName = str( args[0][0]) #first name LName = str( args[0][1]) #last name Email = str( args[0][2]) # visitor email address MessageBody = str( args[0][3]) message = mail.EmailMessage(sender = Email, subject="My Website") message.to = "<my email address>" message.body = MessageBody message.send() Could you please advise me on what is going wrong here? Why does not direct the user to the google login page? Thank you very much, Nora --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---