sabuhish / fastapi-mail

Fastapi mail system sending mails(individual, bulk) attachments(individual, bulk)
https://sabuhish.github.io/fastapi-mail/
MIT License
698 stars 81 forks source link

SSL/TLS and STARTTLS irritations #146

Closed tammoippen closed 2 years ago

tammoippen commented 2 years ago

Hi there!

In find the documentation and usage for SSL/TLS and STARTTLS with this library irritating: in the documentation, you state

• MAIL_TLS : For TLS connection
• MAIL_SSL : For TLS connection

(see here)

Then in the code, you use MAIL_TLS for STARTTLS and MAIL_SSL for SSL/TLS: here

From the aiosmtplib doc, use_tls is for TLS/SSL and it has an explicit start_tls flag: https://aiosmtplib.readthedocs.io/en/latest/client.html#connecting-over-tls-ssl (and the next section).

I would like to having the options renamed:

But, i guess, that is a breaking change ... at least have the docs improved?

Thank you for the nice library!

sabuhish commented 2 years ago

Hi again, that is confising for sure. I will take into account your comments, and currently working on a PR. I will just submit a PR soon, Let's have look at that there, agree?

sabuhish commented 2 years ago

Could you please take a look at the #150 ?