# Action Mailer - Timeout error

**URL:** <https://www.ruby-forum.com/t/action-mailer-timeout-error/78513>\
**Category:** Rails\
**Created:** [December 6, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/action-mailer-timeout-error/78513 "2006-12-06T13:37:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@prasad](https://www.ruby-forum.com/u/prasad)\
**Post date:** [December 6, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/action-mailer-timeout-error/78513/1 "2006-12-06T13:37:31Z")

</div>

Hi guys!

There is a problem in sending mail through the action mailer.  
Sometimes the mails are successfully sent whereas in some cases it gives  
me Timeout error.  
The controller code that I wrote is as follows:-

NotifierMailer.deliver\_sendpassword(sMailId, sPassword,  
capitalize\_words(sUserName))  
redirect\_to :controller =\> “mycnt”,  
:action=\>“index”,:q\_sMailId=\>sMailId,:q\_fSuccess=\>“1”

At times its redirecting properly to the index page but most of the time  
it gives me the timeout error.

Is there any way to increase the script execution time?

thanks in advance.

regards,  
john

---

<div class="post-metadata">

**Author:** ![prasad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@prasad](https://www.ruby-forum.com/u/prasad)\
**Post date:** [December 6, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/action-mailer-timeout-error/78513/2 "2006-12-06T15:41:41Z")

</div>

I’ve thought about this - would it work to thread out the processes,  
then render, then join at the end?

---

<div class="post-metadata">

**Author:** ![prasad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@prasad](https://www.ruby-forum.com/u/prasad)\
**Post date:** [December 8, 2006, 1:55pm UTC](https://www.ruby-forum.com/t/action-mailer-timeout-error/78513/3 "2006-12-08T13:55:41Z")

</div>

Jason N. wrote:

> I’ve thought about this - would it work to thread out the processes,  
> then render, then join at the end?

Thanks for the reply. But the problem is that it is sending the mail and  
then instead of redirecting to the index page, it gives me error 500  
Page could not be found.

---

<div class="post-metadata">

**Author:** ![prasad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@prasad](https://www.ruby-forum.com/u/prasad)\
**Post date:** [December 8, 2006, 7:17pm UTC](https://www.ruby-forum.com/t/action-mailer-timeout-error/78513/4 "2006-12-08T19:17:42Z")

</div>

404 is page not found. 500 is internal server error. Is the mail server  
you’re connecting to local? Most user mail accounts are set up for POP  
before SMTP. Possibly yours is the same way, so if you’ve POPed  
recently, it works, and if not, it doesn’t. For production, this  
obviously shouldn’t be a problem, since the app should be on a machine  
that has free access to the mail server.  
Just my thoughts.  
Jason
