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"""\
MermsEmr
{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 # < table # width = "550px" # border = "0" # cellpadding = "3" # cellspacing = "3" # background - color = "#F0F8FF" # style = "font-size:16px" > # < tr > # < td # style = "text-align:center" > # < img # style = "width:150px; height:auto;" # src = "https://www.mermsemr.com/images/logo-pink.png" / > # < / td > # < / tr > # < tr > # < td > # {html_content} # < / td > # < / tr > # # < tr > # < td > # For # any # support < br > # Reach # Out < br > # support @ mermsemr.com < br > # https: // www.mermsemr.com / # < / td > # < / tr > # < / table >