parameters: (subject, text, html, from_email, recipient_list, connection=None)
docstring: Actually sends the email. Having this as separate function makes testing multi-part emails easier
docstring_summary: Actually sends the email. Having this as separate function makes testing multi-part emails easier
docstring_tokens: Actually sends the email . Having this as separate function makes testing multi - part emails easier
function: def send_temba_email(subject, text, html, from_email, recipient_list, connection=None):
      """
      Actually sends the email. Having this as separate function makes testing multi-part emails easier
      """
      if settings.SEND_EMAILS:
          if html is not None:
              message = EmailMultiAlternatives(subject, text, from_email, recipient_list, connection=connection)
              message.attach_alternative(html, "text/html")
              message.send()
          else:
              send_mail(subject, text, from_email, recipient_list, connection=connection)
      else:
          # just print to console if we aren't meant to send emails
          print("----------- Skipping sending email, SEND_EMAILS to set False -----------")
          print(text)
          print("------------------------------------------------------------------------")
function_tokens: def send_temba_email ( subject , text , html , from_email , recipient_list , connection = None ) : if settings . SEND_EMAILS : if html is not None : message = EmailMultiAlternatives ( subject , text , from_email , recipient_list , connection = connection ) message . attach_alternative ( html , "text/html" ) message . send ( ) else : send_mail ( subject , text , from_email , recipient_list , connection = connection ) else : # just print to console if we aren't meant to send emails print ( "----------- Skipping sending email, SEND_EMAILS to set False -----------" ) print ( text ) print ( "------------------------------------------------------------------------" )