Closed ZuoGuocai closed 4 years ago
Sure. But SMTP TLS can only be used alone, since you can't use ssl and tls together as the TypeError says. All you need to do is just disable SSL and enable TLS by smtp_tls=True, smtp_ssl=False
.
In fact, TLS or SSL will enabled automatically, you don't need to care about this in most cases.
Sure. But SMTP TLS can only be used alone, since you can't use ssl and tls together as the TypeError says. All you need to do is just disable SSL and enable TLS by
smtp_tls=True, smtp_ssl=False
. In fact, TLS or SSL will enabled automatically, you don't need to care about this in most cases.
I got it. As you said, I try to send email via zmail successfully. The detail config in the below. Thanks for your reply.
server = zmail.server('username', 'password', smtp_host='exchange-server-ip', smtp_port=25,smtp_tls=True, smtp_ssl=False)
smtp_tls=True, smtp_ssl=False
may be a good idea, If I don't config any of them , I would got the error message like that ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1108)
, I guess the reason is that I only open 25 port with tls in the exchange server, but the zmail may be connet to the exchange server via 587 or 465 when the auto model.
In this case, looks like zmail use the default config, since it can't find the config in https://github.com/ZYunH/zmail/blob/master/zmail/info.py , i guess you use a private email server?
I usually send email via exchange servers like this :
but I can't find smtp tls in your documents. Can I send email through zmail to use tls support?
When I set the key of zmail.server like smtp_tls=True,but neither not work correctly. The error message in the below