Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break out SMTP Client Reset Method #79

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

3 participants