<s> from google . appengine . api import mail <EOL> import settings <EOL> import base64 <EOL> from urlparse import urlparse <EOL> class Mail ( object ) : <EOL> def __init__ ( self ) : <EOL> self . sender = settings . EMAIL [ '<STR_LIT>' ] <EOL> def send ( self , email_address , subject , message , request_url = None ) : <EOL> if not email_address or not subject or not message : <EOL> return False <EOL> if request_url : <EOL> request_url = urlparse ( request_url ) <EOL> message = message + "<STR_LIT>" + "<STR_LIT>" + request_url . scheme + "<STR_LIT>" + request_url . netloc + "<STR_LIT>" + base64 . urlsafe_b64encode ( email_address ) <EOL> return mail . send_mail ( self . sender , email_address , subject , message ) </s>
