Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fjace05
Copy link

@fjace05 fjace05 commented Mar 22, 2017

This is a pull request to remedy Issue #77. It breaks out the already existent Reset method on the Go Lang net/smtp Client library. For this fix, the method is added to the SenderCloser interface to make it accessible when running the "Daemon Mode". This will allow users to reset the channel instead of completely closing and reopening the channel after an error occurs while sending a message.

@jordan-wright
Copy link

I hope this can be considered to be merged. The primary use case for me is to keep the existing connection when sending a large number of emails and one of them receives an error.

I've seen cases where after this error is received, calling Send with the same SendCloser results in another error since the state is out of sync.

For now, I'm having to copy the smtpSender and expose my own Reset() method, which feels like quite a bit of duplicated code.

@pedromorgan
Copy link

@fjace05 Any chance you can submit as PR to the Fork so it can be merged ? https://github.com/go-mail/gomail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants