title: lua send mail with gmail account
body: <p>I want to send email with my gmail account, I gave it a try, but no luck, so  is anyone can give me a sample? Any suggestions would be appreciated. Thank you</p>
  
  <p>I used lualogging api,  the code is </p>
  
  <pre><code>require"logging.email"
  
  logger = logging.email {
    rcpt = "aaa@sina.com",
    from = "bbb@gmail.com",
    user = "bbb@gmail.com",
    password = *****,
    server = "smtp.gmail.com",
    port = 587,
    headers = { 
      rcpt = "aaa@sina.com",
      from = "bbb@gmail.com", 
      subject = "[%level] logging.email test", 
    },
  }
  
  logger:error("error!")
  </code></pre>