# Send email when a error happens

**URL:** <https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572>\
**Category:** Rails\
**Created:** [March 29, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572 "2007-03-29T23:56:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [March 29, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572/1 "2007-03-29T23:56:35Z")

</div>

I have a script in ruby that build a software for me once per day and  
when the code is wrong and a error, I don’t if the error has ocurred and  
I don’t know what happened.

I wanna know how I can saw the error, I want that this script tell me  
what happenend by email.

Thanks,

Ivan

---

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [March 30, 2007, 12:19am UTC](https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572/2 "2007-03-30T00:19:35Z")

</div>

Ivan V. wrote:

> I have a script in ruby that build a software for me once per day and  
> when the code is wrong and a error, I don’t if the error has ocurred and  
> I don’t know what happened.
> 
> I wanna know how I can saw the error, I want that this script tell me  
> what happenend by email.
> 
> Thanks,
> 
> Ivan

You can do that, if this is the question, but IF the question “do it for  
me?” then this would be hard to answer 🙂

Maybe like at some Mail extension for ruby if it not implemented in your  
library already.

---

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [March 30, 2007, 1:29am UTC](https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572/3 "2007-03-30T01:29:39Z")

</div>

Ivan V. wrote:

> I have a script in ruby that build a software for me once per day and  
> when the code is wrong and a error, I don’t if the error has ocurred and  
> I don’t know what happened.
> 
> I wanna know how I can saw the error, I want that this script tell me  
> what happenend by email.
> 
> Thanks,
> 
> Ivan

theres a plugin out there that will do this for you

---

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [March 30, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572/4 "2007-03-30T12:04:49Z")

</div>

Hi Ivan, this may be what you’re looking for:

[http://wiki.rubyonrails.com/rails/pages/ExceptionNotification](http://wiki.rubyonrails.com/rails/pages/ExceptionNotification)

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![darth\_ivan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Post date:** [March 30, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/send-email-when-a-error-happens/90572/5 "2007-03-30T16:36:44Z")

</div>

Hi Ivan,

2007/3/29, Ivan V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I wanna know how I can saw the error, I want that this script tell me  
> what happenend by email.

There’ s a recipe in the ruby cookbook in chapter 15.20 about this.

HTH,  
Beate
