Search code examples
ruby-on-railsrubyemailrenderincoming-mail

render received emails in rails, gem?


I want to render received emails (via SMTP Server) that are stored in my DB and my question is:

  • Is there a gem that provides rendering html_part, text_part from incoming email (received via SMTP Server) or something that can help to render an email depending which type it is (HTML, TEXT) ?

with best regards Hannes


Solution

  • yes there is a very beautiful gem mailcatcher here github link Instructions:

    1) install the gem configure it by replacing your default setting with

    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
    

    2) open terminal type mailcatcher enter.

    3) send email.

    4) now open browser and go to this address localhost:1080.

    you will see that you have received email.