[Ruby] ar_mailer including bcc headers

Victor Cosby victorcosby at gmail.com
Tue Jul 31 07:03:02 PDT 2007


On 7/30/07, Eric Hodel <drbrain at segment7.net> wrote:

> The majority of time spent sending an email from Rails is in opening
> and closing the SMTP socket.  I've seen 1000+ emails sent in a
> reasonable amount of time with ar_mailer, so try benchmarking without
> adding BackgroundDRb, and see how far you get.

We sometimes send attachments which take awhile to get encoded and
saved into the database queue. So there is a considerable delay when
the attachment gets above a certain size if going out to 150 or more
recipients because the attachment is getting encoded for each mail.
This can make the user feel something has gone wrong and try clicking
the Send button again, or on large attachments (~1-2+ MB) it can cause
a timeout in Rails.

BTW: I had to change the mail column type from the default TEXT to
LONGTEXT for mysql to support messages/attachments beyond ~65k.
Suggest you include that in the docs.


More information about the Ruby mailing list