# ActionMailer plain text problem and UPPERCASE chars

**URL:** <https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781>\
**Category:** Rails\
**Created:** [June 22, 2009, 7:28pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781 "2009-06-22T19:28:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [June 22, 2009, 7:28pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781/1 "2009-06-22T19:28:14Z")

</div>

Hello,

I am using ActionMailer 2.3.3 to send out a very simple plain text  
email. I am having a very strange issue where the email will not be  
sent out if some of the the lines in the view are set to all caps. I  
can’t figure this one out. It took almost a day to even narrow it down  
to this. I am just calling deliver\_transaction\_email in my controller  
for now…

Here’s the model:

class Notifier \< ActionMailer::Base

def transaction\_email(order\_id, cart, order\_is\_taxable)  
order = Order.find(order\_id)

```
recipients "removed_email_address@domain.invalid"
from "removed_email_address@domain.invalid"
subject "Merchandise order"
sent_on Time.now
body :cart => cart, :order => order, :date_time =>

```

Time.now, :order\_is\_taxable =\> order\_is\_taxable  
end  
end

Below is the view. When the view starts with uppercase chars then a  
line after it is all uppercase as well the email will not be sent. It  
gets even more tricky, because, If I omit the second line of uppercase  
chars… in other places in the view I can successfully use all  
uppercase and some places not. I really can’t establish a fail pattern  
here!

View: same issue if it’s named “transaction\_email.erb”,  
“transaction\_email.html.erb” or as part of an implied multipart/  
alternative “transaction\_email.text.plain.erb” or even as html in  
“transaction\_email.text.html.erb” Yes, it even breaks in an HTML based  
view.

## A NEW ORDER HAS BEEN PLACED

WIll not work unless lower case.  
UPPCASE CHARS HERE BREAK IT.

Ordered on: \<%= @date\_time %\>  
Type: Authorization Only  
\<% if @order\_is\_taxable == “true”%\>  
Amount: \<%= number\_to\_currency(@cart.post\_tax\_total) %\>  
Texas resident sales tax added: Yes  
\<% else %\>  
Amount: \<%= number\_to\_currency(@cart.sub\_total) %\>  
Texas resident sales tax added: No  
\<% end %\>  
…

I am really stumped with this one. If anyone has any insight I’d love  
to hear it.

Thanks a ton,  
Elliott

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [June 22, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781/2 "2009-06-22T19:30:00Z")

</div>

Sorry, I meant ActionMailer 2.3.2.

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [June 22, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781/3 "2009-06-22T19:32:21Z")

</div>

On Jun 22, 6:27 pm, elliottg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello,
> 
> I am using ActionMailer 2.3.3 to send out a very simple plain text  
> email. I am having a very strange issue where the email will not be  
> sent out if some of the the lines in the view are set to all caps. I  
> can’t figure this one out. It took almost a day to even narrow it down  
> to this. I am just calling deliver\_transaction\_email in my controller  
> for now…

In what way does it fail ? (exception thrown, nothing happens, talks  
to the smtp server but message never arrives, message arrives but is  
spam filtered, something else ?)

Fred

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [June 22, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781/4 "2009-06-22T20:12:16Z")

</div>

I just checked the Spam inbox and all the failed messages ended up in  
there.  
What does this mean, how would char case make this happen?

Here’s some answers to your other Qs…

No exceptions are thrown. The site logic flows as if everything worked  
as planned, the production log also states that email was sent to the  
correct address. The log says the exact same thing whether the email  
showed up in my mail client or not.

Thanks for working with me on this Fredrick!

On Jun 22, 1:31 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [June 22, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781/5 "2009-06-22T20:29:41Z")

</div>

Elliott G. wrote:

> I just checked the Spam inbox and all the failed messages ended up in  
> there.  
> What does this mean, how would char case make this happen?

It means that your spam filter uses excessive uppercase as a criterion  
for marking messages as spam! This has nothing to do with Rails.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [June 22, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/actionmailer-plain-text-problem-and-uppercase-chars/170781/6 "2009-06-22T20:37:31Z")

</div>

Thanks for helping me out here guys!

Elliott

On Jun 22, 2:29 pm, Marnen Laibow-Koser \<rails-mailing-l…@andreas-
