# ActionMailer Not Working After Small Change

**URL:** <https://www.ruby-forum.com/t/actionmailer-not-working-after-small-change/144526>\
**Category:** Rails\
**Created:** [July 30, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/actionmailer-not-working-after-small-change/144526 "2008-07-30T17:01:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Post date:** [July 30, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/actionmailer-not-working-after-small-change/144526/1 "2008-07-30T17:01:29Z")

</div>

Greetings,

Well though my crash-course on Rails, I’ve encountered a mystery that  
is driving my somewhat insane. Our previous web developer wrote a  
quick form on our site that allowed the user of the site to request a  
consultaion. The user simply fills in their name, email, phone number  
and a message, then submits the form. The form was working perfectly,  
but I wanted to change the subject line. So, I searched through all of  
my Rails files to determine where I would make that change. I found  
the appropriate file in “Models”.

class Mailer \< ActionMailer::Base

def consultation\_request(details)  
@subject = ‘Request’  
@body = {:details =\> details}  
@recipients = ‘removed\_email\_address@domain.invalid’  
@from = details[:email]  
end  
end

In the process, I noticed that the message was currently being sent to  
my boss at ‘removed\_email\_address@domain.invalid’. For testing purposes, I changed his email  
to my email, ‘removed\_email\_address@domain.invalid’ and sent a test message. It worked great!  
Then, I tried to see if I could have multiple recipients by formatting  
as follows:

‘removed\_email\_address@domain.invalid; removed\_email\_address@domain.invalid’

It did not work. I didn’t get any errors, but I didn’t receive any  
email either. Obviously, my syntax was wrong, so I changed it back to  
just be ‘removed\_email\_address@domain.invalid’ and it still does not work. I can’t even get  
the original configuration to work. Any ideas? Thank you soooo much  
for any help you can provide.

BTW, I tried to post this twice yesterday and it never showed up…any  
reason why this happened? Thanks…

---

<div class="post-metadata">

**Author:** ![jeremy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Post date:** [July 31, 2008, 3:04pm UTC](https://www.ruby-forum.com/t/actionmailer-not-working-after-small-change/144526/2 "2008-07-31T15:04:41Z")

</div>

On 30 Jul 2008, at 15:14, Jeremy wrote:

> In the process, I noticed that the message was currently being sent to  
> my boss at ‘removed\_email\_address@domain.invalid’. For testing purposes, I changed his email  
> to my email, ‘removed\_email\_address@domain.invalid’ and sent a test message. It worked great!  
> Then, I tried to see if I could have multiple recipients by formatting  
> as follows:
> 
> ‘removed\_email\_address@domain.invalid; removed\_email\_address@domain.invalid’

actionmailer doesn’t understand stuff like that. What will work is  
@recipients = [‘removed\_email\_address@domain.invalid’, ‘removed\_email\_address@domain.invalid’]

> It did not work. I didn’t get any errors, but I didn’t receive any  
> email either. Obviously, my syntax was wrong, so I changed it back to  
> just be ‘removed\_email\_address@domain.invalid’ and it still does not work. I can’t even get  
> the original configuration to work. Any ideas? Thank you soooo much  
> for any help you can provide.

It’s easy in this sort of situation to make other changes you forget  
about. revert all changes (you are using source control aren’t  
you 🙂 ) and if the world is sane you should be ok.  
In the specific case of email it’s always worth checking mail server  
logs, spam folders etc…

Fred
