input: Write a python function to send an email using SMTP.
  assert send_email("sender@gmail.com", "receiver@example.com", "password", "Hi There", "This is an email to test the Gmail SMTP service.") == True
  assert send_email("invalid_email", "receiver@example.com", "password", "Hi There", "This is an email to test the Gmail SMTP service.") == False
  assert send_email("sender@gmail.com", "invalid_email", "password", "Hi There", "This is an email to test the Gmail SMTP service.") == False
output: import smtplib
  from email.mime.text import MIMEText
  from email.mime.multipart import MIMEMultipart
  import re
  
  def send_email(sender_email, receiver_email, password, subject, body):
      def is_valid_email(email):
          regex = r'^\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b'
          return re.fullmatch(regex, email)
      
      if not is_valid_email(sender_email) or not is_valid_email(receiver_email):
          return False
  
      message = MIMEMultipart()
      message['From'] = sender_email
      message['To'] = receiver_email
      message['Subject'] = subject
      message.attach(MIMEText(body, 'plain'))
  
      try:
          server = smtplib.SMTP('smtp.gmail.com', 587)
          server.starttls()
          server.login(sender_email, password)
          server.sendmail(sender_email, receiver_email, message.as_string())
          server.quit()
          return True
      except Exception as e:
          return False