Cloud Computing
from google.appengine.api import urlfetch url = "" result = urlfetch.fetch(url) if result.status_code == 200: doSomethingWithResult(result.content)
from google.appengine.api import mail class ConfirmUserSignup(webapp.RequestHandler): def post(self): user_address = self.request.get("email_address") if not mail.is_email_valid(address): # prompt user to enter a valid address else: confirmation_url = createNewUserConfirmation(self.request) sender_address = "support@example.com" subject = "Confirm your registration" body = """ Thank you for creating an account! Please confirm your email address by clicking on the link below: %s """ % confirmation_url mail.send_mail(sender_address, user_address, subject, body)
15 of 19