Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Allow other types of multipart email when using templates

#1691

When using ActionMailer, if you use the view templates (i.e. invitation.text.plain.erb) ActionMailer forces @content_type to multipart/alternative, even if you have specified multipart/mixed as the content type. This becomes problematic when attempting to send multipart/mixed - text/plain and text/calendar types (which is what most email clients need to both show the message and trigger that it is a calendar invite).

The following patch just checks to see if the content type was already set to a multipart type, and if so does not change @content_type.

Reported by Sean Dague · January 3rd, 2009 @ 07:22 PM

State: resolved
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Frederick Cheung
  2. Sean Dague
    Sean Dague

    I've added a v2 of this patch which includes some tests for the functionality, including overwriting the content_type if a non multipart type is specified.

    January 4th, 2009 @ 08:19 PM

  3. Sean Dague
    Sean Dague

    Sorry, bad upload previously, here is another patch that adds the tests.

    January 4th, 2009 @ 08:21 PM

  4. Sean Dague
    Sean Dague

    Just a quick ping on this again. It would be nice to get some review of the included patches, and possibly upstream them.

    January 25th, 2009 @ 02:43 PM

  5. Pratik
    Pratik
    • Assigned user set to Pratik
    • Tag changed from actionmailer, mailer, multipart to actionmailer, mailer, multipart, patch, tests
    • Title changed from [PATCH] allow other types of multipart email when using templates to Allow other types of multipart email when using templates

    March 10th, 2009 @ 03:45 PM

  6. Repository
    Repository
    • State changed from new to resolved

    (from [1dff106888d671dac07f93711ecb319170132c56]) Allow custom type for multipart emails [#1691 Allow other types of multipart email when using templates state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    March 10th, 2009 @ 04:51 PM