title: Flask email API, getting information from form tags
body: <p>I have a contact page, where I want some information sent to my email account when a user submits a message. I have a file send.py set up with the configuration so far just as a test.</p>
  
  <p><strong>send.py</strong></p>
  
  <pre><code>from flask import Flask
  from flask_mail import Mail, Message
  
  app =Flask(__name__)
  mail=Mail(app)
  
  app.config.update(
  DEBUG=True,
  #EMAIL SETTINGS
  MAIL_SERVER='smtp.gmail.com',
  MAIL_PORT=465,
  MAIL_USE_SSL=True,
  MAIL_USERNAME = '(myemailaccount)',
  MAIL_PASSWORD = '(mypassword)'
  )
  
  mail=Mail(app)
  
  @app.route("/")
  def index():
      msg = Message(
            'Hello',
         sender='(myemailaccount)',
         recipients=
             ['(myemailaccount('])
      msg.body = "This is the email body"
      mail.send(msg)
      return "Sent"
  
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <p>On my <strong>routes.py</strong>, I have an <strong>About</strong> page, where I render an HTML template, with some <code>&lt;form&gt;</code> tags, that I want to display in the email, how can I render the HTML code into my <strong>send.py</strong>. Should I save it as arguments in my <strong>routes.py</strong> first? I should I add my <strong>send.py</strong> information inside of my <strong>routes.py</strong>?</p>