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

Comments

Projects
None yet
5 participants
@simonhambly

simonhambly commented Jun 17, 2011

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

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Jun 30, 2011

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Jun 30, 2011

Member

Moved to 0.10.1

Member

nesquena commented Jun 30, 2011

Moved to 0.10.1

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Jul 7, 2011

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@simonhambly

simonhambly Jul 18, 2011

@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

simonhambly commented Jul 18, 2011

@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

@simonhambly simonhambly reopened this Jul 18, 2011

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Jul 18, 2011

Member

Thanks Simon will check back into it!

Member

nesquena commented Jul 18, 2011

Thanks Simon will check back into it!

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Aug 1, 2011

Member

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

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 in 8496dca Aug 30, 2011

@jorgefuertes

This comment has been minimized.

Show comment
Hide comment
@jorgefuertes

jorgefuertes Jan 25, 2016

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.

Contributor

jorgefuertes commented Jan 25, 2016

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

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jan 25, 2016

Member

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

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

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

This comment has been minimized.

Show comment
Hide comment
@jorgefuertes

jorgefuertes Jan 26, 2016

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.

Contributor

jorgefuertes commented Jan 26, 2016

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