original_docstring: Sends emails to the configured email server.
docstring: Sends emails to the configured email server.
docstring_tokens: Sends emails to the configured email server .
code: def send_emails(self, server):
          """Sends emails to the configured email server."""
          with open(Path(self.base_dir, self.file_contacts)) as file:
              reader = csv.reader(file)
              next(reader)
              for index, (short_name, full_name, email) in enumerate(reader, start=1):
                  msg = EmailMessage()
                  msg.set_content(self.email_message.format(name=short_name))
                  msg['Subject'] = self.email_subject
                  msg['From'] = self.email_from
                  msg['To'] = f'{full_name} <{email}>'
                  server.send_message(msg)
                  print(f'{index}. Message sent to {short_name} at "{full_name} <{email}>".')
code_tokens: def send_emails ( self , server ) : with open ( Path ( self . base_dir , self . file_contacts ) ) as file : reader = csv . reader ( file ) next ( reader ) for index , ( short_name , full_name , email ) in enumerate ( reader , start = 1 ) : msg = EmailMessage ( ) msg . set_content ( self . email_message . format ( name = short_name ) ) msg [ 'Subject' ] = self . email_subject msg [ 'From' ] = self . email_from msg [ 'To' ] = f'{full_name} <{email}>' server . send_message ( msg ) print ( f'{index}. Message sent to {short_name} at "{full_name} <{email}>".' )
short_docstring: Sends emails to the configured email server.
short_docstring_tokens: Sends emails to the configured email server .
comment: """Sends emails to the configured email server."""