Closed awiz911 closed 1 year ago
(sorry for my bad English)
Hi Aleksey, thanks for your share your thoughs.
In that moment, 2021, I only had this package for some internal uses in the company, so any proposed change that wasn't required was rejected and I apologize for that.
At this moment, this package is open to any change that will be useful for anyone. That's why I create the v3
branch to allow contributors the changes that will be a breaking change like make a exportable smtpClient, func name changes, etc...
Currently I'm connected to check it every night, but I paused the development by me to concentrate in other projects. So, if you have a change that is a breaking change, use v3
branch, otherwise, the master
branch as the destination branch for your PR.
I can make this happens, but I will not compromise for a short time.
I will left this issue opened and pinned, although I don´t receive PR, is in my TODO list.
Thanks.
Your english is fine. )
I might just do that actually. Will get payed for it too. ))) Without this package would have to pretty much make my own from scratch for project I'm working on. So this seems like a faster way to finish. )))
Hi @awiz911, now you can use a your custom connection https://github.com/xhit/go-simple-mail#send-with-custom-connection
Sorry for delay, thanks for the motivation 🚀
@xhit I'm the one who should be sorry. ( Got caught up with work projects and code-contests and didn't find time to add solution myself. ( Thanks for great lib and great work.
I saw question and comment about proxy in closed issue.
However it's not a network issue.
With "net/smtp" and "golang.org/x/net/proxy" we can easily create smtpClient through proxy:
And would be awesome if smth like this would be possible in this package. Cuz it's quite convient for sending mail. Or if it's too much trouble, then why was smtpClient made not exportable in the first place. It has couple slight differences with net's smtp.Client type: there's a instead of auth and Text made exportable. If instead of creating separate type net's smtp.Client was used then we would have proxy as in code above. Even if there's a different type, then methods to change connections would work too.
Or add couple params to SMTPServer type for proxy and on connect if there are filled in use them for connection. So many ways to do it. Wander why it wasn't done in the first place. (