def prepare_send( self, 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
def prepare_send( self, to=None, subject=None, contents=None, attachments=None, cc=None, bcc=None, headers=None, ): 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, ) recipients = addresses["recipients"] msg_string = msg.as_string() return recipients, msg_string
def prepare_send( self, to=None, subject=None, contents=None, attachments=None, cc=None, bcc=None, headers=None, prettify_html=True, message_id=None, group_messages=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, prettify_html, message_id, group_messages, self.dkim, ) recipients = addresses["recipients"] msg_bytes = msg.as_bytes() return recipients, msg_bytes