feat: remove unused images and update email functionality
- Deleted multiple unused image files from the static media directory. - Enhanced email sending functionality by adding a new method `send_hemail` for sending HTML emails. - Updated the `enviar_correo_bienvenida` task to use the new HTML email method. - Added a new RGPD (General Data Protection Regulation) privacy policy page template. - Updated URL routing to include the new RGPD page. - Added a view function for rendering the RGPD page.
This commit is contained in:
@@ -39,6 +39,23 @@ def send_email(dest: str, title: str, body: str):
|
||||
fail_silently=False,
|
||||
)
|
||||
|
||||
logger.info("EMAIL_SENT to=%s subject=%s", dest, title)
|
||||
return (True,)
|
||||
except Exception as e:
|
||||
logger.exception("EMAIL_SEND_FAILED to=%s subject=%s error=%s", dest, title, str(e))
|
||||
return (False, e)
|
||||
|
||||
def send_hemail(dest: str, title: str, body: str, nbody: str):
|
||||
try:
|
||||
send_mail(
|
||||
subject=title,
|
||||
html_message=body,
|
||||
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||
recipient_list=[dest],
|
||||
fail_silently=False,
|
||||
message=nbody
|
||||
)
|
||||
|
||||
logger.info("EMAIL_SENT to=%s subject=%s", dest, title)
|
||||
return (True,)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user