title: using task queue to send email
body: <p>I wrote my first code with Google Task Queue Python API. It is supposed to send out an email every time URL is entered into the address bar. Although it shows a task in <code>default</code> task queue in my dashboard, I don't know why is it not executed even after an hour of initiating it.</p>
  
  <p>queue-mail.py:-</p>
  
  <pre><code>class sendMail(webapp.RequestHandler):
      def post(self):
          mail.send_mail(
              'X@gmail.com',
          self.request.get('to'),
          self.request.get('subject'),
          self.request.get('body'))
  
  
  taskqueue.add(url='/sendMail',params=dict(
      to='Y@hotmail.com',
  subject = 'Testing task queues',
  body = 'this is a message!'))
  </code></pre>
  
  <p>app.yaml:-</p>
  
  <pre><code>handlers:
   - url: /mail
     script: queue-mail.py
  </code></pre>
  
  <p>I invoked the code as: <code>appid.appspot.com/mail</code></p>