go-mail
go-mail copied to clipboard
x509: certificate signed by unknown authority when using self-signed certificate
Is your feature request related to a problem? Please describe.
I am using mailpit for mail testing, but i got x509: certificate signed by unknown authority error
You may take a look at the thread
Describe the solution you'd like
Maybe add InsecureSkipVerify: true config when testing
Have you tried passing a different http client to the default one in the constructor? Not sure adding this functionality to the client is secure. Let me know how you get on
Yes, i can pass a different http client. But it seems smtp using smtp.SendMail instead of Client send request.
Maybe you can add some code to smtp driver to check if client exists, then using client to send emails like this.
That will be easy to do. I'll add it in soon. Thanks for the feedback!