# Mail problem and rails 2.0.2

**URL:** <https://www.ruby-forum.com/t/mail-problem-and-rails-2-0-2/131850>\
**Category:** Rails\
**Created:** [March 13, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/mail-problem-and-rails-2-0-2/131850 "2008-03-13T20:10:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankit2584](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Post date:** [March 13, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/mail-problem-and-rails-2-0-2/131850/1 "2008-03-13T20:10:11Z")

</div>

Hello,  
I have some code for sending mails. The same worked perfectly on a  
machine running rails version 1.2.5.

Now i have moved the entire application to another system which is  
running rails 2.0.2 Whenever i try to send a mail i get an error  
‘execution expired’

Please go through the following code if you can figure out something  
wrong. Do i need to change something for rails 2.0.2?

My mailer model is as follows:

class UserMailer \< ActionMailer::Base  
def send\_mail(person,textarea,subject)  
recipients person.email1  
from “removed\_email\_address@domain.invalid”  
subject subject  
body textarea  
content\_type “text/html”  
end  
end

In the develeopment.rb i have the smtp settings as  
.  
.  
.

# Check error if the mailer can’t send

config.action\_mailer.raise\_delivery\_errors = true

#set delivery method to :smtp, :sendmail or :test  
config.action\_mailer.delivery\_method = :smtp

#these options are only needed if you choose smtp delivery  
config.action\_mailer.smtp\_settings = {  
:address =\> “[mail.domain.com](http://mail.domain.com)”,  
:port =\> 25,  
:authentication =\> :login,  
:user\_name =\> “removed\_email\_address@domain.invalid”,  
:password =\> ‘123asd213’  
}

Thank you.
