# How can I tell what actionmailer is actually doing?

**URL:** <https://www.ruby-forum.com/t/how-can-i-tell-what-actionmailer-is-actually-doing/190800>\
**Category:** Rails\
**Created:** [June 28, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/how-can-i-tell-what-actionmailer-is-actually-doing/190800 "2010-06-28T12:25:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rod\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a9a28c/32.png) [@Rod\_P](https://www.ruby-forum.com/u/Rod_P)\
**Post date:** [June 28, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/how-can-i-tell-what-actionmailer-is-actually-doing/190800/1 "2010-06-28T12:25:30Z")

</div>

I believe I have my ActionMailer in environment.rb configured  
properly and have setup the proper classes. I am not receiving the e-  
mails I am sending.  
My configuration and classes are below.

What I would like to know is how can I log or determine exactly what  
is happening when I send e-mail.

I am not receiving any exceptions.

Thank you in advance.  
Rod

Controller Code

email = SystemMailer.create\_sent(“removed\_email\_address@domain.invalid”)  
SystemMailer.deliver(email)

Environment.rb settings

config.action\_mailer.delivery\_method = :smtp  
config.action\_mailer.raise\_delivery\_errors = true  
ActionMailer::Base.server\_settings = {  
:address =\> “[mail.mydomain.com](http://mail.mydomain.com)”,  
:port =\> 25,  
:domain =\> “[mydomain.com](http://mydomain.com)”,  
:authentication =\> :login,  
:username =\> “username”,  
:password =\> “password”  
}

My SystemMailer class is as follows

class SystemMailer \< ActionMailer::Base

def sent(recipients)  
subject ‘SystemMailer#sent’  
recipients recipients  
from “removed\_email\_address@domain.invalid”  
sent\_on Time.now  
body :greeting =\> ‘Hi,’

end  
end

---

<div class="post-metadata">

**Author:** ![Rod\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a9a28c/32.png) [@Rod\_P](https://www.ruby-forum.com/u/Rod_P)\
**Post date:** [June 28, 2010, 7:14pm UTC](https://www.ruby-forum.com/t/how-can-i-tell-what-actionmailer-is-actually-doing/190800/2 "2010-06-28T19:14:55Z")

</div>

On Jun 26, 11:30 am, Rod P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thank you in advance.  
> config.action\_mailer.raise\_delivery\_errors = true  
> ActionMailer::Base.server\_settings = {  
> :address =\> “[mail.mydomain.com](http://mail.mydomain.com)”,  
> :port =\> 25,  
> :domain =\> “[mydomain.com](http://mydomain.com)”,  
> :authentication =\> :login,  
> :username =\> “username”,  
> :password =\> “password”
> 
> }

I’m assuming that you kept the address and domain at what was  
instructed to hide the information.

I’d suggest to remove authentication, username, and password  
configurations.
