Open ibalosh opened 1 year ago
@ibalosh I think you're just relying on the default simple behaviour, and you'll have to force the content-types and parts if you want that structure; a bit further into the readme you can find samples on how to use multipart/mixed
, multipart/related
, and multipart/alternative
: https://github.com/mikel/mail/blob/master/README.md#writing-and-sending-a-multipartalternative-html-and-text-email
@dlouzan thank you for reply. I agree, that is how I am creating multipart messages, using something like the example you shared, so I can have proper structure in the email. I am not using the simple example.
Still though, the incorrect placements I shared is generated by example which is in the readme file. If that's not how email should be created, it should not be there at all.
In the example in the readme file there is this code snippet:
this snippet would generate an email which would look something like this:
Judging by RFC 2046 the email should have been generated with structure that looks something like this:
while the structure is:
which seems wrong since RFC says:
by my understanding, multiplart/alternative is mostly used for viewing alternative representation of content html, text, or something else, while attachment is not fitting this case.
I have reproduced this with mail.gem version 2.7.1