Skip to content

Timeout for email #84

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

Closed
datmt opened this issue Jul 4, 2017 · 5 comments
Closed

Timeout for email #84

datmt opened this issue Jul 4, 2017 · 5 comments

Comments

@datmt
Copy link

datmt commented Jul 4, 2017

Hello,

Thanks for the great library.

I'm developing a mail sending application. In normal condition, the app sends mails just fine. However, if there are problems with the emails (wrong format, not exists), the app did not stop but keep trying to send the mail.

I wonder if there is a setting to set the maximum time to wait on one email so it can skip the one that takes too long to send.

Thanks

@bbottema
Copy link
Owner

bbottema commented Jul 4, 2017

Hi @datmt, it's up to your application design if you implement delays or not. This libraries just sends sends emails for you (it doesn't have retry functionality either).

There are just two modes of sending:

  1. synchronous (mailer.send(yourEmail)): which waits until a message has been accepted completely by the SMTP server
  2. asynchronous (mailer.send(yourEmail, true)): which doesn't wait and returns right away for the next operation

It's up to you to design your application around these two options.

@bbottema bbottema closed this as completed Jul 4, 2017
@bbottema
Copy link
Owner

@datmt can you please confirm that it was your app that kept retrying and not .send() that kept blocking indefinitely?

@datmt
Copy link
Author

datmt commented Jul 11, 2017

Hello @bbottema ,

Thanks for taking time to answer. I still don't know. I just create a new thread and send the mail. I noticed that error related to emails format are reported. I will test further and let you know.

Have a great day!

@bbottema
Copy link
Owner

Also see #85

@datmt
Copy link
Author

datmt commented Jul 11, 2017

Thanks!

I think it's best to set timeout on the thread in my case

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

No branches or pull requests

2 participants