推荐学习书目
› 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 · 4455 views
    This topic created in 2755 days ago, the information mentioned may be changed or developed.

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

    5 replies  •  2019-04-24 11:08:14 +08:00
    binux
    binux
    Apr 22, 2019
    1
    你确定你们的代理没把 smtp 的端口都封了?
    commad
    commad
    Apr 22, 2019
    2
    也只能用 connect 方法了
    Northxw
    Northxw
    Apr 22, 2019
    3
    lieh222
    lieh222
    Apr 23, 2019
    4
    模拟登录页面客户端发,比如登录 mail.qq.com
    jeadong
    jeadong
    Apr 24, 2019
    5
    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   ·   5135 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 06:17 · PVG 14:17 · LAX 22:17 · JFK 01:17
    ♥ Do have faith in what you're doing.