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 "acct-f52GMkFzgz/6V6G2DxALlg@public.gmane.org" from "acct-Nx6MfkwdiUAL4mQ1idikCwC/G2K4zDHf@public.gmane.org" 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
Sorry, I meant ActionMailer 2.3.2.
Frederick Cheung
2009-Jun-22 17:31 UTC
Re: ActionMailer plain text problem and UPPERCASE chars
On Jun 22, 6:27 pm, elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> 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> Here''s the model: > > class Notifier < ActionMailer::Base > > def transaction_email(order_id, cart, order_is_taxable) > order = Order.find(order_id) > > recipients "a...-f52GMkFzgz/6V6G2DxALlg@public.gmane.org" > from "a...-Nx6MfkwdiUAL4mQ1idikCwC/G2K4zDHf@public.gmane.org" > 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
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 Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jun 22, 6:27 pm, elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> 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 > > > > > Here''s the model: > > > class Notifier < ActionMailer::Base > > > def transaction_email(order_id, cart, order_is_taxable) > > order = Order.find(order_id) > > > recipients "a...-f52GMkFzgz/6V6G2DxALlg@public.gmane.org" > > from "a...-Nx6MfkwdiUAL4mQ1idikCwC/G2K4zDHf@public.gmane.org" > > 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
Marnen Laibow-Koser
2009-Jun-22 18:29 UTC
Re: ActionMailer plain text problem and UPPERCASE chars
Elliott Golden 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 marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Thanks for helping me out here guys! Elliott On Jun 22, 2:29 pm, Marnen Laibow-Koser <rails-mailing-l...@andreas- s.net> wrote:> Elliott Golden 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-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com/.