Note that there are some explanatory texts on larger screens.

plurals
  1. POActionMailer - limit on number of recipients?
    text
    copied!<p>I've got Capistrano set up to send emails after deploying my RoR (2.3.8) application. I have a <code>config/cap_mailer.rb</code> file that basically looks like:</p> <pre><code>ActionMailer::Base.smtp_settings = { :address =&gt; my, :port =&gt; exchange, :domain =&gt; server, :authentication =&gt; settings, :user_name =&gt; are, :password =&gt; here } class CapMailer &lt; ActionMailer::Base def deploy_notification(cap_vars) recipients cap_vars[:notify_emails] from 'deploy@my.org' subject "New app!" body "Deployed application...blah blah blah" end end </code></pre> <p>Then, in my <code>deploy.rb</code> file, I have the following:</p> <pre><code>require 'config/cap_mailer.rb' ... desc "Email recipients of deployment" task :notify do puts " * Sending notification email" set :notify_emails, ["test1@my.org", "test2@my.org", etc.] CapMailer.deliver_deploy_notification(self) end </code></pre> <p>Now this all works fine and dandy......until I put more than 7 email addresses in the <b>:notify_emails</b> array. Up to 7 works fine, but when I put 8 or more (all valid addresses), the email gets screwed up a little bit (still goes through to the first 7, at least). Looking at the email header, it shows that it is cutting off the 8th (and 9th, 10th, ...) address from the 'To:' and putting it in the message body.</p> <blockquote> <p>HEADER:<br/> thread-index: AcyaZxlga08L9p35QYKJ22aiGG2zeA==<br/> Content-Class: urn:content-classes:message<br/> Importance: normal<br/> Priority: normal<br/> X-MimeOLE: Produced By ...<br/> Received: from exchange.my.org ([ip address]) by ...; Thu, 3 Nov 2011 14:28:08 -0600<br/> Date: Thu, 3 Nov 2011 14:28:08 -0600<br/> From: deploy@my.org<br/> To: test1@my.org,<br/> test2@my.org,<br/> test3@my.org,<br/> test4@my.org,<br/> test5@my.org,<br/> test6@my.org,<br/> test7@my.org<br/> HEADER:<br/> <br/> BODY:<br/> test8@my.org<br/> Message-Id: <br/> &lt;4eb2f95816341_135ff800c21ac130@my_box.local.tmail><br/> Subject: New app!<br/> Mime-Version: 1.0<br/> Content-Type: text/plain; charset=utf-8<br/> Return-Path: deploy@my.org<br/> X-OriginalArrivalTime: 03 Nov 2011 20:28:08.0494 (UTC) <br/> FILETIME=[19601CE0:01CC9A67]<br/> <br/> Deployed application...blah blah blah<br/> BODY:</p> </blockquote> <p>In addition, the subject does not appear on the email, even though the "error text" in the message body shows the correct subject.</p> <p>Does anyone have any idea why this is happening? What is it about having 8 or more recipients that breaks it? I've Googled around and can't find anything about ActionMailer having a limit on the number of recipients (even if there were, that's a small limit). Is there something I'm missing? Any help is appreciated! I really need to be able to send to 8 or more recipients.</p> <p><strong>UPDATE:</strong> Setting the <strong>recipients</strong> directly with an array of 8 or more addresses still breaks things, so this clearly seems like a problem with ActionMailer and not Capistrano.</p> <pre><code>recipients ["test1@my.org", "test2@my.org", "test3@my.org", "test4@my.org", "test5@my.org", "test6@my.org", "test7@my.org", "test8@my.org", "test9@my.org"] </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload