推荐学习书目
› 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
304464743
V2EX  ›  Python

通过 http 代理发送邮件

  •  
  •   304464743 · Apr 22, 2019 · 4353 views
    This topic created in 2721 days ago, the information mentioned may be changed or developed.

    公司的生产和测试环境都是通过 squid 服务器代理上网的,这种情况下,如何使用 python 发送邮件? (不想在生产环境中再安装 socket 代理了)

    5 replies  •  2019-04-24 11:08:14 +08:00
    binux
        1
    binux  
       Apr 22, 2019
    你确定你们的代理没把 smtp 的端口都封了?
    commad
        2
    commad  
       Apr 22, 2019
    也只能用 connect 方法了
    Northxw
        3
    Northxw  
       Apr 22, 2019
    lieh222
        4
    lieh222  
       Apr 23, 2019
    模拟登录页面客户端发,比如登录 mail.qq.com
    jeadong
        5
    jeadong  
       Apr 24, 2019
    import smtplib
    from email.mime.text import MIMEText
    from email.mime.multipart import MIMEMultipart
    from email import encoders

    这几个库试试看 我就用这些然后写了个 PY 定期晚上发文件给各个邮箱
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2221 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:40 · PVG 14:40 · LAX 23:40 · JFK 02:40
    ♥ Do have faith in what you're doing.