import datetime def change_your_password_template(**kwargs): user_name, forgot_link, current_year = ( kwargs["user_name"], kwargs["forgot_link"], str(datetime.datetime.now().year), ) template = """ Bootstrap demo
Company Logo

Reset Password

Dear %s,

We have received a request to reset your password for your account with Let's Program Blog. To complete the password reset process, please click on the button below:

Please note that this link is only valid for a day only. If you did not request a password reset, please disregard this message.

""" % ( user_name, forgot_link, current_year, ) return template def password_is_changed_template(**kwargs): user_name, current_year = kwargs["user_name"], str(datetime.datetime.now().year) template = """ Thank You for Changing Your Password
Company Logo

Your Password has changed

Dear %s,

We wanted to let you know that your password has been successfully updated. If you did not make this change or if you believe an unauthorized person has accessed your account, please contact our support team immediately.

Thank you for helping us keep your account secure.

""" % ( user_name, current_year, ) return template def invalid_ip_or_address_found(**kwargs): user_name, current_year, address = ( kwargs["user_name"], str(datetime.datetime.now().year), kwargs.get("address"), ) template = """ Thank You for Changing Your Password
Company Logo

An Unknown login has been attempted

Dear %s,

We wanted to let you know that an unusual login attempt has been tried from address below. If you have login from address below please ignore this message

Thank you for helping us keep your account secure.

Address of ip attempt

City : %s

Zip Code : %s

Country : %s

Region : %s

Region Name : %s

If you are not login from this address lets us now by clicking link below

""" % ( user_name, address["city"], address["zip"], address["country"], address["region"], address["regionName"], kwargs["notice_link"], current_year, ) return template