__author__ = 'sagi' from google.appengine.api import mail def send_validation_email(token, email, name): emailSuffix = str(email).split('@')[1] message = mail.EmailMessage(sender="SE-Hub Support ", subject="SE-Hub Activate Account") message.to = email message.body = """ Dear """+name+""": To Activate your SE-Hub Account please click on the link below:
http://se-hub.appspot.com/api/validation/confirm/"""+token+"""|"""+emailSuffix+""" to get access to your Campus :) Please let us know if you have any questions. SE-Hub (c) 2015 niptop Team. """ message.html = """

Hey """+name+"""- Just one More Step...

Dear """+name+""":

To Activate your SE-Hub Account please click on the link below:
http://se-hub.appspot.com/api/validation/confirm/"""+token+"""|"""+emailSuffix+""" to access you virtual class.


Please let us know if you have any questions.
SE-Hub (c) 2015 niptop Team. """ message.send() def send_create_campus_request(email, name, campus_name): message = mail.EmailMessage(sender="SE-Hub Support ", subject="SE-Hub: "+campus_name+" Is Being Evaluated") message.to = email message.body = """ Dear """+name+""": Thank You For Choosing SE-Hub! Your Request for creating a new Campus named """+campus_name + """ is Being Evaluated. You Will Receive an e-mail When We finish the process
Please let us know if you have any questions. SE-Hub (c) 2015 niptop Team. """ message.html = """

Thank You For Choosing SE-Hub!

Dear """+name+""":

Your Request for creating a new Campus named """+campus_name + """ is Being Evaluated. You Will Receive an e-mail When We finish the process
to access you virtual class.


Please let us know if you have any questions.
SE-Hub (c) 2015 niptop Team. """ message.send() def notify_se_hub_campus_request(campus, campus_name): message = mail.EmailMessage(sender="SE-Hub Support ", subject="SE-Hub: "+campus_name+" Is Being Evaluated") message.to = 'se-hub@appspot.gserviceaccount.com' message.body = """ a new Campus request """+str(campus.to_JSON()) message.html = """

New Campus!


""" + str(campus.to_JSON()) + """
SE-Hub (c) 2015 niptop Team. """ message.send()