input: Write a function to send an automated email message using smtplib.
  assert send_email('smtp.example.com', 587, 'username', 'password', 'from_email@example.com', 'to_email@example.com', 'Welcome to our site') == 'Email sent successfully'
  assert send_email('smtp.example.com', 587, 'username', 'wrong_password', 'from_email@example.com', 'to_email@example.com', 'Welcome to our site') == 'Login failed'
  assert send_email('smtp.example.com', 587, 'username', 'password', 'from_email@example.com', 'invalid_email', 'Welcome to our site') == 'Failed to send email'
output: import smtplib
  from email.mime.text import MIMEText
  from email.mime.multipart import MIMEMultipart
  
  def send_email(smtp_server, port, username, password, from_email, to_email, message):
      try:
          server = smtplib.SMTP(smtp_server, port)
          server.starttls()
          server.login(username, password)
      except smtplib.SMTPAuthenticationError:
          return 'Login failed'
      
      msg = MIMEMultipart()
      msg['From'] = from_email
      msg['To'] = to_email
      msg['Subject'] = 'Automated Message'
      msg.attach(MIMEText(message, 'plain'))
      
      try:
          server.sendmail(from_email, to_email, msg.as_string())
          server.quit()
          return 'Email sent successfully'
      except Exception:
          return 'Failed to send email'