def send_key_activation_mail(reciever_email, key): html_message = render_template('emails/key_activation.html', key=key) text_message = render_template('emails/key_activation.txt', key=key) msg = Message('Product Key Activation', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_login_email_mail(reciever_email, link): html_message = render_template('emails/login_email_link.html', link=link) text_message = render_template('emails/login_email_link.txt', link=link) msg = Message('Login Email Link', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_confirmation_mail(reciever_email, link): html_message = render_template('emails/email_confirmation.html', link=link) text_message = render_template('emails/email_confirmation.txt', link=link) msg = Message('Email Activation link', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_reset_password_mail(reciever_email, link): html_message = render_template('emails/reset_password_link.html', link=link) text_message = render_template('emails/reset_password_link.txt', link=link) msg = Message('Reset password link', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_tenant_approval_check_mail(reciever_email, link): html_message = render_template('emails/tenant_approval_link.html', link=link) text_message = render_template('emails/tenant_approval_link.txt', link=link) msg = Message('Tenant Approval Mail', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_registration_mail(reciever_email, link): html_message = render_template('emails/registration_confirmation.html', link=link) text_message = render_template('emails/registration_confirmation.txt', link=link) msg = Message('Create account link', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_ownerreject_mail(reciever_email): html_message = render_template( 'emails/email_userreject.html', link='Sorry. Your Tenant has rejected the property confirmation.') text_message = render_template( 'emails/email_userreject.txt', link='Sorry. Your Tenant has rejected the property confirmation..') msg = Message('Property Rejected', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_userapproval_mail(reciever_email): html_message = render_template( 'emails/email_userapproval.html', link='Congratulations. Your property has been approved.') text_message = render_template( 'emails/email_userapproval.txt', link='Congratulations. Your property has been approved.') msg = Message('Account Activated', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_tenantreject_mail(reciever_email): html_message = render_template( 'emails/email_userreject.html', link='You have successfully rejected the property confirmation.') text_message = render_template( 'emails/email_userreject.txt', link='You have successfully rejected the property confirmation.') msg = Message('Property Rejected', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_inactive_meter_owner_mail(reciever_email): html_message = render_template( 'emails/email_userreject.html', link= 'Billing request failed for your meter. It will be conducted again in the next 7 days. If it fails to do so your meter will be deactivated.' ) text_message = render_template( 'emails/email_userreject.txt', link= 'Billing request failed for your meter. It will be conducted again in the next 7 days. If it fails to do so your meter will be deactivated.' ) msg = Message('Inactive Meter Owner', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_bill_owner_mail(reciever_email): html_message = render_template( 'emails/email_userreject.html', link= 'Your bill for the month is successfully generated. Please check your dashboard' ) text_message = render_template( 'emails/email_userreject.txt', link= 'Your bill for the month is successfully generated. Please check your dashboard' ) msg = Message('New Bill', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_support_query_pending_mail(reciever_email, ticket_id): html_message = render_template( 'emails/email_userreject.html', link= 'Admin has just acknowledges you query with Ticket Id {}. The Support Team will get back to you shortly' .format(ticket_id)) text_message = render_template( 'emails/email_userreject.txt', link= 'Admin has just acknowledges you query with Ticket Id {}. The Support Team will get back to you shortly' .format(ticket_id)) msg = Message('Support Query Acknowledged', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_support_query_completed_mail(reciever_email, ticket_id): html_message = render_template( 'emails/email_userreject.html', link= 'Your problem with Ticket ID {} has been successfully resolved. This query is being closed by the admin' .format(ticket_id)) text_message = render_template( 'emails/email_userreject.txt', link= 'Your problem with Ticket ID {} has been successfully resolved. This query is being closed by the admin' .format(ticket_id)) msg = Message('Support Query Solved', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_userreject_mail(reciever_email): html_message = render_template( 'emails/email_userreject.html', link= 'Sorry. The System administrator has rejected your property for AuthElectric. You can try to register a new property again with valid information. In case of any quries feel free to contact us.' ) text_message = render_template( 'emails/email_userreject.txt', link= 'Sorry. The System administrator has rejected your property for AuthElectric. You can try to register a new property again with valid information. In case of any quries feel free to contact us.' ) msg = Message('Account Rejected', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_disabled_meter_owner_mail(reciever_email): html_message = render_template( 'emails/email_userreject.html', link= 'The second request was made for your electricity meter and it was found inactive. Thus your accound has been disabled. Contact the admin for more information.' ) text_message = render_template( 'emails/email_userreject.txt', link= 'The second request was made for your electricity meter and it was found inactive. Thus your accound has been disabled. Contact the admin for more information.' ) msg = Message('Disabled Meter Owner', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_support_query_mail(reciever_email, ticket_id): html_message = render_template( 'emails/email_userreject.html', link= 'You have successfully registered your query with Ticket Id {}. Please use the same ID for further communication. The Support Team will get back to you shortly' .format(ticket_id)) text_message = render_template( 'emails/email_userreject.txt', link= 'You have successfully registered your query with Ticket Id {}. Please use the same ID for further communication. The Support Team will get back to you shortly' .format(ticket_id)) msg = Message('Support Ticket Raised', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_tenant_leave_tenant_mail(reciever_email, prop_name): html_message = render_template( 'emails/email_userreject.html', link= 'You have successfully left the property named {}. If there is a problem please contact your owner' .format(prop_name)) text_message = render_template( 'emails/email_userreject.txt', link= 'You have successfully left the property named {}. If there is a problem please contact your owner' .format(prop_name)) msg = Message('Tenant Left', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)
def send_owner_leave_tenant_mail(reciever_email, prop_name): html_message = render_template( 'emails/email_userreject.html', link= 'Tenant has left from your property named : {}. If you wish to add him back you can go to the add tenant option.' .format(prop_name)) text_message = render_template( 'emails/email_userreject.txt', link= 'Tenant has left from your property named : {}. If you wish to add him back you can go to the add tenant option.' .format(prop_name)) msg = Message('Tenant Left', recipients=[reciever_email]) msg.body = text_message msg.html = html_message mail.send(msg)