input: Write a python function to send an email using the `smtplib` library.
  assert send_mail('test_sender@example.com', 'test_recipient@example.com', 'Test Subject', 'Test Body')==None
  assert send_mail('another_sender@example.com', 'another_recipient@example.com', 'Another Subject', 'Another Body')==None
output: def send_mail(sender, recipient, subject, body):
      import smtplib
      from email.mime.text import MIMEText
      from email.mime.multipart import MIMEMultipart
  
      # Create a MIMEText object
      msg = MIMEMultipart()
      msg['From'] = sender
      msg['To'] = recipient
      msg['Subject'] = subject
  
      # Attach the body with the msg instance
      msg.attach(MIMEText(body, 'plain'))
  
      # Send the email
      try:
          with smtplib.SMTP('smtp.example.com', 587) as server:
              server.starttls()
              server.login(sender, 'your_password')
              server.sendmail(sender, recipient, msg.as_string())
      except Exception as e:
          print(f"Error: {e}")