original_docstring: send an email as a specific sender
  
      >>> zoom.system.site = zoom.sites.Site()
      >>> send_as('a-user@testco.com', 'joe@testco.com', "test", "This is a test")
  
      This function compares the sender to the default send_from information
      configured for the site, and if they differ it includes a Reply-To header
      in the email message.
  
      NOTE: Some email providers may flag emails sent using the reply-to header
      as spam or phishing emails.  To send email reliably when the domains of the
      site send_from address differ from the reply-to address domain the system
      must be configured properly.  There is much written on this topic so we
      don't try to cover it here, however here is a useful place to start:
  
      * https://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/
  
      
docstring: 
  
  This function compares the sender to the default send_from information
  configured for the site, and if they differ it includes a Reply-To header
  in the email message.
  
  Some email providers may flag emails sent using the reply-to header
  as spam or phishing emails.  To send email reliably when the domains of the
  site send_from address differ from the reply-to address domain the system
  must be configured properly.  There is much written on this topic so we
  don't try to cover it here, however here is a useful place to start.
  
  
docstring_tokens: This function compares the sender to the default send_from information configured for the site and if they differ it includes a Reply - To header in the email message . Some email providers may flag emails sent using the reply - to header as spam or phishing emails . To send email reliably when the domains of the site send_from address differ from the reply - to address domain the system must be configured properly . There is much written on this topic so we don ' t try to cover it here however here is a useful place to start .
code: def send_as(sender, recipients, subject, message, attachments=None):
      """send an email as a specific sender
  
      >>> zoom.system.site = zoom.sites.Site()
      >>> send_as('a-user@testco.com', 'joe@testco.com', "test", "This is a test")
  
      This function compares the sender to the default send_from information
      configured for the site, and if they differ it includes a Reply-To header
      in the email message.
  
      NOTE: Some email providers may flag emails sent using the reply-to header
      as spam or phishing emails.  To send email reliably when the domains of the
      site send_from address differ from the reply-to address domain the system
      must be configured properly.  There is much written on this topic so we
      don't try to cover it here, however here is a useful place to start:
  
      * https://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/
  
      """
  
      site = context.site
      sender = as_sender_tuple(sender)
      recipients = make_recipients_list(recipients)
  
      if site.mail_delivery != 'background':
          expedite(site, sender, recipients, subject, message, attachments, 'html')
      else:
          raise Exception('background email processing not yet implemented')
          # put = get_mail_store(site).put
          # post(put, sender, recipients, subject, message, attachments, 'html')
code_tokens: def send_as ( sender , recipients , subject , message , attachments = None ) : site = context . site sender = as_sender_tuple ( sender ) recipients = make_recipients_list ( recipients ) if site . mail_delivery != 'background' : expedite ( site , sender , recipients , subject , message , attachments , 'html' ) else : raise Exception ( 'background email processing not yet implemented' )
short_docstring: send an email as a specific sender
  >>> zoom.system.site = zoom.sites.Site()
  >>> send_as('a-user@testco.com', 'joe@testco.com', "test", "This is a test")
short_docstring_tokens: send an email as a specific sender >>> zoom . system . site = zoom . sites . Site () >>> send_as ( ' a - user@testco . com ' ' joe@testco . com ' " test " " This is a test " )
comment: """send an email as a specific sender
  
      >>> zoom.system.site = zoom.sites.Site()
      >>> send_as('a-user@testco.com', 'joe@testco.com', "test", "This is a test")
  
      This function compares the sender to the default send_from information
      configured for the site, and if they differ it includes a Reply-To header
      in the email message.
  
      NOTE: Some email providers may flag emails sent using the reply-to header
      as spam or phishing emails.  To send email reliably when the domains of the
      site send_from address differ from the reply-to address domain the system
      must be configured properly.  There is much written on this topic so we
      don't try to cover it here, however here is a useful place to start:
  
      * https://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/
  
      """$SEP$# put = get_mail_store(site).put$SEP$# post(put, sender, recipients, subject, message, attachments, 'html')