Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GAE(python)需要如何接收邮件并在留言板上发布,然后向所有用户发送邮件?_Python_Google App Engine_Email - Fatal编程技术网

GAE(python)需要如何接收邮件并在留言板上发布,然后向所有用户发送邮件?

GAE(python)需要如何接收邮件并在留言板上发布,然后向所有用户发送邮件?,python,google-app-engine,email,Python,Google App Engine,Email,有人知道我的程序有什么问题吗?? 我写了一个main.py。并将其发送给GAE。 但当我在GAE上键入一些单词时,它无法向表中的作者发送邮件 class Send(webapp.RequestHandler): def send(self): mail.send_mail(sender=users.get_current_user(), to=Greeting.autho

有人知道我的程序有什么问题吗?? 我写了一个main.py。并将其发送给GAE。 但当我在GAE上键入一些单词时,它无法向表中的作者发送邮件

 
    class Send(webapp.RequestHandler):         
       def send(self):

          mail.send_mail(sender=users.get_current_user(), 
                             to=Greeting.author.all(),#Table 
                           body=self.request.get('content'))

          self.redirect("/")

    application = webapp.WSGIApplication([
      ('/', MainPage),
      ('/sign', Guestbook),##click sign to use Guestbook
      ('/sign', Send)
    ], debug=True)

    class ReceiveEmail(InboundMailHandler):
        def receive(self,message):
            logging.info("Received email from %s" % message.sender)
            plaintext = message.bodies(content_type='text/plain')

            mail.send_mail(sender=mail_message.sender, 
                               to=m.Greeting.author.all(), 
                             body=plaintext)

    application = webapp.WSGIApplication([
      ReceiveEmail.mapping()
    ], debug=True)
我写了一个handle\u incoming\u email.py 试着发邮件到123@http:appid.appspotmail.com 但我看不到表中的任何内容,也无法向表中的作者发送邮件

 
    class Send(webapp.RequestHandler):         
       def send(self):

          mail.send_mail(sender=users.get_current_user(), 
                             to=Greeting.author.all(),#Table 
                           body=self.request.get('content'))

          self.redirect("/")

    application = webapp.WSGIApplication([
      ('/', MainPage),
      ('/sign', Guestbook),##click sign to use Guestbook
      ('/sign', Send)
    ], debug=True)

    class ReceiveEmail(InboundMailHandler):
        def receive(self,message):
            logging.info("Received email from %s" % message.sender)
            plaintext = message.bodies(content_type='text/plain')

            mail.send_mail(sender=mail_message.sender, 
                               to=m.Greeting.author.all(), 
                             body=plaintext)

    application = webapp.WSGIApplication([
      ReceiveEmail.mapping()
    ], debug=True)
有关接收电子邮件的信息,请参阅

有关发送电子邮件的信息,请参阅

e、 g


我建议您阅读Python入门指南(),其中有一个简单留言簿的演示。然后阅读邮件API概述()。