# Can't send mail with login\_engine

**URL:** <https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378>\
**Category:** Engines\
**Created:** [September 3, 2006, 4:17am UTC](https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378 "2006-09-03T04:17:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hansman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hansman](https://www.ruby-forum.com/u/hansman)\
**Post date:** [September 3, 2006, 4:17am UTC](https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378/1 "2006-09-03T04:17:39Z")

</div>

Hi,

I am using login\_engine REL\_1.0.3 and user\_engine REL\_1.0.2 on Rails  
1.1.2. I have been unable to send email using the UserNotify  
controller. The config for LoginEngine has been set to  
use\_email\_notification=true.

I know that the ActiveMailer configuration is correct, because I can  
use the same configuration in another application without engines and  
emails are sent. I tried two seperate ones and they both work.

I set config.action\_mailer.raise\_delivery\_errors = true, but did not  
see errors in the logs.

Any ideas what to try next?

- Rick

---

<div class="post-metadata">

**Author:** ![hansman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hansman](https://www.ruby-forum.com/u/hansman)\
**Post date:** [September 7, 2006, 2:14am UTC](https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378/2 "2006-09-07T02:14:36Z")

</div>

Am I in the wrong forum for this question? I am kinda stumped and I am  
looking for a clue for a way to resolve this.

- Rick

Rick H. wrote:

> Hi,
> 
> I am using login\_engine REL\_1.0.3 and user\_engine REL\_1.0.2 on Rails  
> 1.1.2. I have been unable to send email using the UserNotify  
> controller. The config for LoginEngine has been set to  
> use\_email\_notification=true.
> 
> I know that the ActiveMailer configuration is correct, because I can  
> use the same configuration in another application without engines and  
> emails are sent. I tried two seperate ones and they both work.
> 
> I set config.action\_mailer.raise\_delivery\_errors = true, but did not  
> see errors in the logs.
> 
> Any ideas what to try next?
> 
> - Rick

---

<div class="post-metadata">

**Author:** ![hansman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hansman](https://www.ruby-forum.com/u/hansman)\
**Post date:** [September 7, 2006, 5:23am UTC](https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378/3 "2006-09-07T05:23:39Z")

</div>

Make sure perform\_deliveries is true (default is true, just trying to  
help  
🙂

config.action\_mailer.perform\_deliveries = true

2006/9/6, Rick H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![hansman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hansman](https://www.ruby-forum.com/u/hansman)\
**Post date:** [September 26, 2006, 7:37am UTC](https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378/4 "2006-09-26T07:37:05Z")

</div>

honglun#12 wrote:

> Eduardo R. wrote:
> 
> > Make sure perform\_deliveries is true (default is true, just trying to  
> > help  
> > 🙂
> > 
> > config.action\_mailer.perform\_deliveries = true
> > 
> > 2006/9/6, Rick H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> I am also encountering this problem, and i 've tried to add the line  
> above to the config/environment.rb under module LoginEngine, seems it  
> still can’t help~
> 
> i ran my apps from script/console, Errors are like this;
> 
> ?\> MemberNotify.deliver\_signup(Member.new, “”, “”)  
> ArgumentError: wrong number of arguments (1 for 2)  
> from (eval):3:in `initialize_template_class' from (eval):3:in `render\_message’  
> from  
> ./script/…/config/…/config/…/vendor/plugins/engines/lib/engines/action\_mail er\_extensions.rb:59:in  
> `create!' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:331:in `initialize’  
> from  
> /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `new' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:291:in `method\_missing’  
> from (irb):3
> 
> and i d
> 
> and then i digged into the action\_mailer\_extensions.rb, line 59 and find  
> the error is from the following line:
> 
> ```
> @body = render_message(@template, @body) if template_exists
> 
> ```
> 
> i wonder if it is something related to the @body, but i have no way to  
> figure it out~ and i 've been searching on the web for 2 days with no  
> obvious solution!!
> 
> helps really appreciated~
> 
> Wai-lun

It seems working after i deleted all the override content in the  
action\_mailer\_extensions.rb, remain only this:

# Overriding ActionMailer to teach it about Engines…

module ActionMailer  
end

but i think it is not the best approach to solve the problem, just  
narrow down the scope that something happened in the  
action\_mailer\_extension.rb code

---

<div class="post-metadata">

**Author:** ![hansman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hansman](https://www.ruby-forum.com/u/hansman)\
**Post date:** [September 26, 2006, 7:02am UTC](https://www.ruby-forum.com/t/cant-send-mail-with-login-engine/67378/5 "2006-09-26T07:02:35Z")

</div>

Eduardo R. wrote:

> Make sure perform\_deliveries is true (default is true, just trying to  
> help  
> 🙂
> 
> config.action\_mailer.perform\_deliveries = true
> 
> 2006/9/6, Rick H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

I am also encountering this problem, and i 've tried to add the line  
above to the config/environment.rb under module LoginEngine, seems it  
still can’t help~

i ran my apps from script/console, Errors are like this;

```
?> MemberNotify.deliver_signup(Member.new, "", "")
ArgumentError: wrong number of arguments (1 for 2)
        from (eval):3:in `initialize_template_class'
        from (eval):3:in `render_message'
        from 

```

./script/…/config/…/config/…/vendor/plugins/engines/lib/engines/action\_mailer\_extensions.rb:59:in  
`create!' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:331:in `initialize’  
from  
/usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `new' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:291:in `method\_missing’  
from (irb):3

and i d

and then i digged into the action\_mailer\_extensions.rb, line 59 and find  
the error is from the following line:

```
   @body = render_message(@template, @body) if template_exists

```

i wonder if it is something related to the @body, but i have no way to  
figure it out~ and i 've been searching on the web for 2 days with no  
obvious solution!!

helps really appreciated~

Wai-lun
