Markdown to text/plain and text/html for multipart email
        Posted  
        
            by fphilipe
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by fphilipe
        
        
        
        Published on 2010-05-13T10:00:16Z
        Indexed on 
            2010/05/13
            10:04 UTC
        
        
        Read the original article
        Hit count: 291
        
I’m looking for a solution to send DRY multipart emails in Rails. With DRY I mean that the content for the mail is only defined once.
I’ve thought about some possible solutions but haven’t found any existing implementations.
The solutions I’ve thought about are:
- load the text from I18n and apply Markdown for the html mail and apply Markdown with a special output type for the text mail where
- links are put in parenthesis after the link text
- bold, italic and other formatting that doesn't make sense are removed
- ordered and unordered lists are maintained
 
- generate only the html mail and convert that to text according to the above conditions
Is there any available solution out there? Which one is probably the better way to do it?
© Stack Overflow or respective owner