Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
to=None,
subject=None,
contents=None,
attachments=None,
cc=None,
bcc=None,
headers=None,
newline_to_break=True,
):
addresses = resolve_addresses(self.user, self.useralias, to, cc, bcc)
if self.soft_email_validation:
for email_addr in addresses["recipients"]:
validate_email_with_regex(email_addr)
msg = prepare_message(
self.user,
self.useralias,
addresses,
subject,
contents,
attachments,
headers,
self.encoding,
newline_to_break,
)
recipients = addresses["recipients"]
msg_string = msg.as_string()
return recipients, msg_string