Hello,
I am trying to send email by using the examples in the tutorial:
http://code.google.com/appengine/docs/python/mail/overview.html
************************************************
class MainPage(webapp.RequestHandler):
def get(self):
message = mail.EmailMessage(sender="
sen...@gmail.com",
subject="test email from app")
message.to = "
rece...@gmail.com"
message.body = "Hello"
message.send()
def post(self):
user_address = "
rece...@gmail.com"
confirmation_url = "
http://support.example.com/"
sender_address = "
sen...@gmail.com"
subject = "confirm your registration"
body = "Click on the link %s " % confirmation_url
mail.send_mail(sender_address, user_address, subject, body)
******************************************************
The first version works; but the second one works only if I change it
to "get":
def get(self):
user_address = "
a...@gmail.com"
....
Can anyone explain how get and post work in this context. Thanks!