SIENTIAPDE-1172
refactor: rename send_email method to try_send_email and update parameter type - Renamed the send_email method to try_send_email for clarity in its purpose. - Changed the receivers parameter type from list[str] to str to simplify the method signature.
This commit is contained in:
@@ -101,7 +101,7 @@ class Email(BaseActivity):
|
||||
|
||||
return msg
|
||||
|
||||
def send_email(self, msg: MIMEMultipart, receivers: list[str]):
|
||||
def try_send_email(self, msg: MIMEMultipart, receivers: str):
|
||||
"""
|
||||
Sends an email to the receivers.
|
||||
"""
|
||||
@@ -167,7 +167,7 @@ class Email(BaseActivity):
|
||||
if notification.get('attachment_content') is not None],
|
||||
msg)
|
||||
|
||||
self.send_email(msg, receivers)
|
||||
self.try_send_email(msg, receivers)
|
||||
except Exception as e:
|
||||
self.error(f"Failed to send email to {group_name}: {e}",
|
||||
metadata=metadata)
|
||||
|
||||
Reference in New Issue
Block a user