input: Write a function to send an email when an exception occurs and log the error details.
  assert send_email_with_log() is None
output: def send_email_with_log():
      import smtplib
      from email.mime.text import MIMEText
      import logging
      import traceback
  
      # Configure logging
      logging.basicConfig(filename='error.log', level=logging.ERROR)
      
      # Email details
      from_email = "your_email@example.com"
      to_email = "recipient_email@example.com"
      subject = "Error Notification"
      smtp_server = "smtp.example.com"
      smtp_port = 587
      smtp_user = "your_smtp_username"
      smtp_password = "your_smtp_password"
      
      try:
          # Placeholder for code that might raise an exception
          raise ValueError("This is a test exception")
          
      except Exception as e:
          # Log the exception
          logging.error("An error occurred: %s", traceback.format_exc())
  
          # Create the email content
          body = f"An error occurred:\n\n{traceback.format_exc()}"
          msg = MIMEText(body)
          msg["Subject"] = subject
          msg["From"] = from_email
          msg["To"] = to_email
  
          # Send the email
          with smtplib.SMTP(smtp_server, smtp_port) as server:
              server.starttls()
              server.login(smtp_user, smtp_password)
              server.sendmail(from_email, to_email, msg.as_string())