Closed Godod closed 7 years ago
Hello. If you want use HTTPS instead of HTTP, you need set smtp_ssl=True, else you could use HTTP by default without set smtp_ssl=True.
I installed your commit and used smtp_ssl=True
, but then it gave me the error which indicates that when trying to use SSL like that it was using HTTP (thus not working). Are you sure you're using SSL?
Yes, I sure. I'm using 465 port for my mail (not gmail) and it worked normally. I'm using this options:
self._credentials = {
'user': settings.get('mail.username'),
'password': settings.get('mail.password'),
'host': settings.get('mail.host'),
'port': int(settings.get('mail.port')),
'smtp_ssl': strtobool(settings.get('mail.ssl', 'true')),
'smtp_starttls': False
}
I can show you sending email traceback, if you want.
Thanks a lot! Indeed, I was trying to use oauth2, and the port is not used correctly then (you can see the "login" method on SSL overriding the port).
I guess what needs to be done is to make the port change in case SSL is being used, then it should work. Except for oauth2 it currently does not.
It will make more sense to make a single login; it has to be refactored :)
In commit https://github.com/kootenpv/yagmail/commit/4797f4868d59e0136189560ee28fbcb352543457 I did the refactoring! Very happy about the result :)
On PyPi since yagmail==0.10.190
, please upgrade with:
pip install -U --no-cache yagmail # python 2 most likely
pip3 install -U --no-cache yagmail # python 3
Hey, thanks a lot for attempting it, I missed it!
I'm getting:
when using
smtp_ssl=True
, googling finds that it means that it is making a HTTP request.