original_docstring:  Send an email using the SendGrid API
          Args:
              - email :string => the user's work email (ie username@company.com)
              - subject :string => the subject line for the email
              - template :string => the template file, corresponding to the email sent.
              - template_arguments :dictionary => keyword arguments to specify to render_template
          Returns:
              - SendGrid response
      
docstring: Send an email using the SendGrid API
docstring_tokens: Send an email using the SendGrid API
code: def send_single_email(email, subject, template, template_arguments):
      """ Send an email using the SendGrid API
          Args:
              - email :string => the user's work email (ie username@company.com)
              - subject :string => the subject line for the email
              - template :string => the template file, corresponding to the email sent.
              - template_arguments :dictionary => keyword arguments to specify to render_template
          Returns:
              - SendGrid response
      """
      load_secrets()
      env = Environment(loader=PackageLoader('yelp_beans', 'templates'))
      template = env.get_template(template)
      rendered_template = template.render(template_arguments)
  
      message = Mail(
          Email(SENDGRID_SENDER),
          To(email),
          subject,
          Content("text/html", rendered_template)
      )
  
      return send_grid_client.client.mail.send.post(request_body=message.get())
code_tokens: def send_single_email ( email , subject , template , template_arguments ) : load_secrets ( ) env = Environment ( loader = PackageLoader ( 'yelp_beans' , 'templates' ) ) template = env . get_template ( template ) rendered_template = template . render ( template_arguments ) message = Mail ( Email ( SENDGRID_SENDER ) , To ( email ) , subject , Content ( "text/html" , rendered_template ) ) return send_grid_client . client . mail . send . post ( request_body = message . get ( ) )
short_docstring: Send an email using the SendGrid API
short_docstring_tokens: Send an email using the SendGrid API
comment: """ Send an email using the SendGrid API
          Args:
              - email :string => the user's work email (ie username@company.com)
              - subject :string => the subject line for the email
              - template :string => the template file, corresponding to the email sent.
              - template_arguments :dictionary => keyword arguments to specify to render_template
          Returns:
              - SendGrid response
      """