diff --git a/asabiris/orchestration/sendmail.py b/asabiris/orchestration/sendmail.py index 7fc87604..d3374be1 100644 --- a/asabiris/orchestration/sendmail.py +++ b/asabiris/orchestration/sendmail.py @@ -37,7 +37,7 @@ async def send_mail( ): """ It sends an email - + :param email_to: The email address to send the email to :param email_from: The email address to send the email from. If not provided, the default email address will be used @@ -100,7 +100,7 @@ async def send_mail( email_to=email_to, email_cc=email_cc, email_bcc=email_bcc, - email_subject=email_subject, + email_subject=email_subject, body=body_html, attachments=atts ) diff --git a/asabiris/orchestration/webhandler.py b/asabiris/orchestration/webhandler.py index 952938ea..e71d5b9d 100644 --- a/asabiris/orchestration/webhandler.py +++ b/asabiris/orchestration/webhandler.py @@ -108,7 +108,7 @@ async def send_mail(self, request, *, json_data): except SMTPDeliverError: raise aiohttp.web.HTTPServiceUnavailable(text="SMTP error") - + # More specific exception handling goes here so that the service provides nice output return asab.web.rest.json_response(request, {"result": "OK"}) diff --git a/asabiris/output/smtp/service.py b/asabiris/output/smtp/service.py index 0a208e7f..2e9885c7 100644 --- a/asabiris/output/smtp/service.py +++ b/asabiris/output/smtp/service.py @@ -154,4 +154,3 @@ async def send( raise SMTPDeliverError("SMTP delivery failed") L.log(asab.LOG_NOTICE, "Email sent", struct_data={'result': result[1], "host": self.Host}) -