xhit / go-simple-mail

Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.
MIT License
650 stars 102 forks source link

error info inappropriate when auth password need update #78

Closed lingr7 closed 1 year ago

lingr7 commented 1 year ago

the email service which is used by me, has the Passwords need to be updated regularly mechanism. so the account will be locked can not login when It's been a long time since last login. in this case, the library give error info like belong

Mail Error: SMTP Connection timed out
Mail Error: No SMTP Client Provided

In this case, can you give a password related error message: The account password is correct, but the password needs to be updated, so you cannot log in immediately. You need to change the password and log in again.

lingr7 commented 1 year ago

i submit the issue to Give other people who encounter similar problems a little debug prompt

xhit commented 1 year ago

Hi

The SMTP server should return that error.

The error you received is because the SMTP server is not sending a status code with a predefined message, the ideal is SMTP close the conn and send it.