from app.notifications.aws.aws_mailer import send_email_ses from app.utils.logger import logger def send_email_factory(to_email, subject, html_content, text_content=None): try: send_email_ses( to_email=to_email, subject=subject, html_content=body_template(html_content) ) except Exception as e: logger.error(f"Send_Email_Factory failed: {e}") raise def alert_email_factory(to_email, subject, html_content, text_content=None): try: send_email_ses( to_email=to_email, subject=subject, html_content=alert_template(html_content) ) except Exception as e: logger.error(f"Alert_Email_Factory failed: {e}") raise def body_template(html_content): html_body = f"""\
{html_content}
For any support
Reach Out
support@mermsemr.com
https://www.mermsemr.com/
""" return html_body def alert_template(html_content): html_body = f"""\
{html_content}

LINKS --- ---- ---- -----
For any support
Reach Out
support@mermsemr.com
https://www.mermsemr.com/
""" return html_body