go-mail icon indicating copy to clipboard operation
go-mail copied to clipboard

x509: certificate signed by unknown authority when using self-signed certificate

Open kaptinlin opened this issue 3 years ago • 3 comments

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

kaptinlin avatar Aug 06 '22 14:08 kaptinlin

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

ainsleyclark avatar Aug 08 '22 08:08 ainsleyclark

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.

kaptinlin avatar Aug 08 '22 16:08 kaptinlin

That will be easy to do. I'll add it in soon. Thanks for the feedback!

ainsleyclark avatar Sep 05 '22 19:09 ainsleyclark