code: def send(mail, server='localhost'):
      
      sender = mail.get_sender()
      rcpt = mail.get_receipients()
      session = smtplib.SMTP(server)
      message = MIMEMultipart()
      message['Subject'] = mail.get_subject()
      message['From'] = mail.get_sender()
      message['To'] = ', '.join(mail.get_to())
      message['Cc'] = ', '.join(mail.get_cc())
      message.preamble = 'Your mail client is not MIME aware.'
  
      body = MIMEText(mail.get_body().encode("utf-8"), "plain", "utf-8")
      body.add_header('Content-Disposition', 'inline')
      message.attach(body)
  
      for filename in mail.get_attachments():
          message.attach(_get_mime_object(filename))
  
      session.sendmail(sender, rcpt, message.as_string())
docs: Sends the given mail.
  
      :type  mail: Mail
      :param mail: The mail object.
      :type  server: string
      :param server: The address of the mailserver.