Exemplo n.º 1
0
def send_confirmation_email(data):
    if not data.has_key('email'):
        data['email'] = data['person'].email
    data['validation_link'] = misc.get_tmp_link()
    EmailValidation.objects.create(**data)
    subject = "Confirm email address for Skyproc.com"
    name = "%s %s" % (data['person'].first_name, data['person'].last_name)
    msg = "Hi %s,\n\n" % name.strip()
    msg += "You're using this inbox as an email address on Skyproc.com.\n\n"
    msg += "To confirm this is correct, please go to https://%s/validate/email/%s\n\n" % \
            (settings.SP_HOME_URL, data['validation_link'])
    msg += "___________\n"
    msg += "Skyproc.com"
    send_mail(subject, msg, settings.SENDER_EMAIL, [data['email']])
Exemplo n.º 2
0
def send_confirmation_email(data):
    if not data.has_key('email'):
        data['email'] = data['person'].email    
    data['validation_link'] = misc.get_tmp_link()
    EmailValidation.objects.create(**data)
    subject = "Confirm email address for Skyproc.com"
    name = "%s %s" % (data['person'].first_name, data['person'].last_name)
    msg = "Hi %s,\n\n" % name.strip()
    msg += "You're using this inbox as an email address on Skyproc.com.\n\n"
    msg += "To confirm this is correct, please go to https://%s/validate/email/%s\n\n" % \
            (settings.SP_HOME_URL, data['validation_link'])
    msg += "___________\n"
    msg += "Skyproc.com"
    send_mail(subject, msg, settings.SENDER_EMAIL, [data['email']])
Exemplo n.º 3
0
def create_pwd_reset_request(user):
    p = Person.objects.getOwn(user)
    reset_link = misc.get_tmp_link()
    PasswordResetRequest.objects.create(person=p, reset_link=reset_link)

    # send pwd reset email
    subject = "Reset password for Skyproc.com"
    name = "%s %s" % (p.first_name, p.last_name)
    msg = "Hi %s,\n\n" % name.strip()
    msg += "Someone (probably you) has requested a new password for your account on Skyproc.com.\n\n"
    msg += "To confirm this and create a new password, please go to https://%s/reset/password/%s\n\n" % \
            (settings.SP_HOME_URL, reset_link)
    msg += "Otherwise, simply ignore this message.\n\n"
    msg += "___________\n"
    msg += "Skyproc.com"
    send_mail(subject, msg, settings.SENDER_EMAIL, [p.email])
Exemplo n.º 4
0
def create_pwd_reset_request(user):
    p = Person.objects.getOwn(user)
    reset_link = misc.get_tmp_link()
    PasswordResetRequest.objects.create(person=p, reset_link=reset_link)
        
    # send pwd reset email
    subject = "Reset password for Skyproc.com"
    name = "%s %s" % (p.first_name, p.last_name)
    msg = "Hi %s,\n\n" % name.strip()
    msg += "Someone (probably you) has requested a new password for your account on Skyproc.com.\n\n"
    msg += "To confirm this and create a new password, please go to https://%s/reset/password/%s\n\n" % \
            (settings.SP_HOME_URL, reset_link)
    msg += "Otherwise, simply ignore this message.\n\n"
    msg += "___________\n"
    msg += "Skyproc.com"
    send_mail(subject, msg, settings.SENDER_EMAIL, [p.email])