用Python从Zimbra发送电子邮件

时间:2018-02-07 09:19:46

标签: python python-2.7 zimbra

如何使用Python从Zimbra发送电子邮件。 This是gmail的一个例子,是否有任何Zimbra的例子?

这是信息:

Zimbra服务器:10.0.0.8

登录电子邮件:https:\\10.0.0.8

我的测试邮件:test_maas@b2mportal.gemlikgis.com

1 个答案:

答案 0 :(得分:1)

尝试使用:

import smtplib

 

server = smtplib.SMTP('10.0.0.8', 25)

server.starttls()

server.login("mail@example.com", "IAmAStrongPassword")

 

msg = "Help me with my math, please!"

server.sendmail("superteacher@math.com", "THE EMAIL ADDRESS TO SEND TO", msg)

server.quit()

希望它会为你效劳!