Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default content type for mailer incorrect #575

Closed
simonhambly opened this issue Jun 17, 2011 · 9 comments
Closed

Default content type for mailer incorrect #575

simonhambly opened this issue Jun 17, 2011 · 9 comments
Assignees
Milestone

Comments

@simonhambly
Copy link

Hi,

Just been having some trouble with the mailer and sending multipart emails to gmail. If you configure the email as described in the "mailer guide" like so

email :email_notification do
    ...
    provides :plain, :html
    render 'notifier/new_notification_email'
end

the default content type is "multipart/mixed" not "multipart/alternative" as the guide incorrectly states.

Having "multipart/mixed" causes gmail to display both the plain and html versions of the email. Changing the email config as below (adding content_type)

email :email_notification do
    ...
    content_type 'multipart/alternative'
    provides :plain, :html
    render 'notifier/new_notification_email'
end

ensure the email is displayed correclty

@ghost ghost assigned DAddYE Jun 17, 2011
@DAddYE
Copy link
Member

DAddYE commented Jun 30, 2011

Im unable to reproduce your problem, for me works fine and the content_type is 'alternative', the only case that I've 'mixed' is when I attach a file.

@nesquena
Copy link
Member

Moved to 0.10.1

@nesquena
Copy link
Member

nesquena commented Jul 7, 2011

@simonhambly I can't reproduce this either...any pointers? Can you try again on 0.10.0 (just released)

@simonhambly
Copy link
Author

@nequena I've put together a little test app to illustrate - the repo is on github.

The mailers are in /app/mailers... they send multipart email (plain and html using haml template). There are 2 mailers; one that uses the default content_type and the other uses multipart/alternate.

I've included two screenshots of the emails in gmail (admittedly google apps for domains) to show you the problem - these are in the /gmail-screenshots folder.

Let me know if you can reproduce this. Oh, yes nearly forget this with the padrino 0.10.0 gem

@nesquena
Copy link
Member

Thanks Simon will check back into it!

@nesquena
Copy link
Member

nesquena commented Aug 1, 2011

Moving to 0.10.2 for now, as 0.10.1 is becoming a hotfix release.

@DAddYE DAddYE closed this as completed in 8496dca Aug 30, 2011
@jorgefuertes
Copy link
Contributor

I don't know if is possible to reopen this one... now some MUAs, and over some MTAs, shows only the last part, for example an attachement. No text content and no html content, because all are multipart/alternative, suggesting each part is just an alternate view of the same message.

Text and Html should be alternates, but no the attachments.

I've tried to workaround it, but no results.

@ujifgc
Copy link
Member

ujifgc commented Jan 25, 2016

This looks like mail gem problem: mikel/mail#522

I don't think it's related to the original issue.

@jorgefuertes
Copy link
Contributor

I'll take a look but in my case the problem is with pdf attachments too. I think you are right and is a mail gem problem. Thank you very much, @ujifgc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants