V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bighu
V2EX  ›  Python

flask 用户验证接收不到邮件,代码照抄的,头疼。希望帮我看下

  •  
  •   bighu · 2017-05-14 13:17:57 +08:00 · 3385 次点击
    这是一个创建于 2783 天前的主题,其中的信息可能已经有所发展或是发生改变。
    程序没有报错,就是可不到邮件,不知道哪里出了问题
    send: 'ehlo [192.168.1.101]\r\n'
    reply: b'250-mail\r\n'
    reply: b'250-PIPELINING\r\n'
    reply: b'250-AUTH LOGIN PLAIN\r\n'
    reply: b'250-AUTH=LOGIN PLAIN\r\n'
    reply: b'250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrusxxSUCa0xDrUUUUj\r\n'
    reply: b'250-STARTTLS\r\n'
    reply: b'250 8BITMIME\r\n'
    reply: retcode (250); Msg: b'mail\nPIPELINING\nAUTH LOGIN PLAIN\nAUTH=LOGIN PLAIN\ncoremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrusxxSUCa0xDrUUUUj\nSTARTTLS\n8BITMIME'
    send: 'STARTTLS\r\n'
    reply: b'220 Ready to start TLS\r\n'
    reply: retcode (220); Msg: b'Ready to start TLS'
    send: 'ehlo [192.168.1.101]\r\n'
    reply: b'250-mail\r\n'
    reply: b'250-PIPELINING\r\n'
    reply: b'250-AUTH LOGIN PLAIN\r\n'
    reply: b'250-AUTH=LOGIN PLAIN\r\n'
    reply: b'250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrTpkykUCa0xDrUUUUj\r\n'
    reply: b'250-STARTTLS\r\n'
    reply: b'250 8BITMIME\r\n'
    reply: retcode (250); Msg: b'mail\nPIPELINING\nAUTH LOGIN PLAIN\nAUTH=LOGIN PLAIN\ncoremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrTpkykUCa0xDrUUUUj\nSTARTTLS\n8BITMIME'
    send: 'AUTH PLAIN ADEzMTY2MzM3OTE5QDE2My5jb20AYTEyMzEyMw==\r\n'
    reply: b'235 Authentication successful\r\n'
    reply: retcode (235); Msg: b'Authentication successful'
    send: 'mail FROM:<[email protected]>\r\n'
    reply: b'250 Mail OK\r\n'
    reply: retcode (250); Msg: b'Mail OK'
    send: 'rcpt TO:<[email protected]>\r\n'
    reply: b'250 Mail OK\r\n'
    reply: retcode (250); Msg: b'Mail OK'
    send: 'data\r\n'
    reply: b'354 End data with <CR><LF>.<CR><LF>\r\n'
    reply: retcode (354); Msg: b'End data with <CR><LF>.<CR><LF>'
    data: (354, b'End data with <CR><LF>.<CR><LF>')
    send: b'Content-Type: multipart/mixed; boundary="===============5894479498722303218=="\r\nMIME-Version: 1.0\r\nSubject: [Flasky] Confirm Your Account\r\nFrom: =?utf-8?q?Flasky_Admin?= <[email protected]>\r\nTo:
    [email protected]\r\nDate: Sun, 14 May 2017 12:44:58 +0800\r\nMessage-ID: <149473709779.8096.5644776744267083978@THINKPAD-PC>\r\n\r\n--===============5894479498722303218==\r\nContent-Type: multipart/alternative;\
    r\n boundary="===============8736041487175388237=="\r\nMIME-Version: 1.0\r\n\r\n--===============8736041487175388237==\r\nContent-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encodin
    g: 7bit\r\n\r\nDear asdfasdf,\r\n\r\nWelcome to Flasky!\r\n\r\nTo confirm your account please click on the following link:\r\n\r\nhttp://127.0.0.1:5000/auth/confirm/eyJhbGciOiJIUzI1NiIsImlhdCI6MTQ5NDczNzA5NywiZXh
    wIjoxNDk0NzQwNjk3fQ.eyJjb25maXJtIjoxfQ.w9GNmAwREq0QrnWfd_4YUwSPzD1vOYod5JyV3nZX3l8\r\n\r\nSincerely,\r\n\r\nThe Flasky Team\r\n\r\nNote: replies to this email address are not monitored.\r\n--===============873604
    1487175388237==\r\nContent-Type: text/html; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\n<p>Dear asdfasdf,</p>\r\n<p>Welcome to <b>Flasky</b>!</p>\r\n<p>To confirm your account p
    lease <a href="http://127.0.0.1:5000/auth/confirm/eyJhbGciOiJIUzI1NiIsImlhdCI6MTQ5NDczNzA5NywiZXhwIjoxNDk0NzQwNjk3fQ.eyJjb25maXJtIjoxfQ.w9GNmAwREq0QrnWfd_4YUwSPzD1vOYod5JyV3nZX3l8">click here</a>.</p>\r\n<p>Alter
    natively, you can paste the following link in your browser\'s address bar:</p>\r\n<p>http://127.0.0.1:5000/auth/confirm/eyJhbGciOiJIUzI1NiIsImlhdCI6MTQ5NDczNzA5NywiZXhwIjoxNDk0NzQwNjk3fQ.eyJjb25maXJtIjoxfQ.w9GNmA
    wREq0QrnWfd_4YUwSPzD1vOYod5JyV3nZX3l8</p>\r\n<p>Sincerely,</p>\r\n<p>The Flasky Team</p>\r\n<p><small>Note: replies to this email address are not monitored.</small></p>\r\n--===============8736041487175388237==--
    \r\n\r\n--===============5894479498722303218==--\r\n.\r\n'
    reply: b'250 Mail OK queued as smtp7,C8CowAAHnTgw4RdZBNcoFA--.2907S3 1494737201\r\n'
    reply: retcode (250); Msg: b'Mail OK queued as smtp7,C8CowAAHnTgw4RdZBNcoFA--.2907S3 1494737201'
    data: (250, b'Mail OK queued as smtp7,C8CowAAHnTgw4RdZBNcoFA--.2907S3 1494737201')
    send: 'quit\r\n'
    reply: b'221 Bye\r\n'
    reply: retcode (221); Msg: b'Bye'

    这个也没有报错,代码是我直接拷下来了,邮箱这我改成了 163 邮箱
    4 条回复    2017-05-14 13:47:07 +08:00
    tumbzzc
        1
    tumbzzc  
       2017-05-14 13:20:30 +08:00 via Android
    让我看什么?
    shuirong1997
        2
    shuirong1997  
       2017-05-14 13:27:15 +08:00 via Android   ❤️ 2
    题主你既然学 flask,知道 cocde.cc 吗? 那里面都是学 flask 的,去吧,皮卡丘。
    bighu
        3
    bighu  
    OP
       2017-05-14 13:46:05 +08:00
    @shuirong1997 我去看了下找到答案,我代码没错,全部进入垃圾邮件了尴尬!
    just1
        4
    just1  
       2017-05-14 13:47:07 +08:00 via Android
    追求到达率用邮件推送吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3697 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:35 · PVG 18:35 · LAX 02:35 · JFK 05:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.