mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
Support email
This commit is contained in:
@ -46,6 +46,22 @@ def send_otp_email(recipient_email, otp):
|
||||
)
|
||||
return otp
|
||||
|
||||
def send_support_email(name, sender, subject, message):
|
||||
"""Send otp on email with template"""
|
||||
to_email = [settings.EMAIL_FROM_ADDRESS]
|
||||
from_email = settings.DEFAULT_ADDRESS
|
||||
send_templated_mail(
|
||||
template_name='support_mail.email',
|
||||
from_email=from_email,
|
||||
recipient_list=to_email,
|
||||
context={
|
||||
'name': name.title(),
|
||||
'sender': sender,
|
||||
'subject': subject,
|
||||
'message': message
|
||||
}
|
||||
)
|
||||
return name
|
||||
def custom_response(detail, data=None, response_status=status.HTTP_200_OK):
|
||||
"""Custom response code"""
|
||||
if not data:
|
||||
|
Reference in New Issue
Block a user