Rails will helpfully send multipart email if there are multiple template types present (e.g. .txt
and .html
files for the same mailer action).
However, what if I want to do this without templates? Normally we specify body and content_type as arguments:
mail to: 'a@example.com', subject: 'Hello', body: 'Hi', content_type: 'text/html'
So how can this be achieved with multiple bodies having their own type?