Skip to content

Conversation

hspazio
Copy link
Contributor

@hspazio hspazio commented May 31, 2017

Problem: Net::POP3 uses a default read_timeout of 60 seconds which can be overridden using read_timeout= method. On an application I work we deal with mailboxes having a large volume of emails and large attachments. Sometimes, depending on the traffic we may get a Net::ReadTimeout error when hitting the 60 seconds limit.

This PR allows specifying the read_timeout configuration for Net::POP3 by passing in the :read_timeout configuration when specifying the retriever.

Mail.defaults do
  retriever_method :pop3, { 
    :address             => "localhost",
    :port                => 995,
    :user_name           => "username",
    :password            => "Secret!",
    :enable_ssl          => true,
    :read_timeout        => 200 }
end

Regarding the spec, I used send to invoke a private method. I saw it being used for some other specs so I figured it could be fine. Is there a better way to test this or it's already good?

Thank you,
Fabio

@hspazio
Copy link
Contributor Author

hspazio commented Oct 3, 2017

Hello @jeremy, is there any updates on this PR?
Thanks! ;)

Copy link
Collaborator

@jeremy jeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hspazio 👍

@jeremy jeremy added this to the 2.7.0 milestone Oct 5, 2017
@jeremy jeremy closed this in 9c3b17f Oct 5, 2017
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.

2 participants