/mailman_example_code

This is a sample app showing how to fetch and parse emails using mailman gem.

Primary LanguageRuby

This is a sample app showing how to fetch and parse emails using mailman gem. https://github.com/titanous/mailman

How to run this application

  1. At the command prompt, clone this app:

    <tt>git clone git@github.com:mohitjain/mailman_example_code.git</tt>
  2. Change directory to mailman_example_code and run the bundler, database create and migrate and start server:

    <tt>cd mailman_example_code; bundle install; rake db:create; rake db:migrate; rails s</tt>
  3. Go to localhost:3000/messages to see the list of messages been fetched:

  4. Go to scripts/mailman_server file and change your gmail username and password in order to test the application.

  5. Run mailman server by running scripts/mailman_server command

  6. Send an email to email specified in the script/mailman_server file and you can see new messages at localhost:3000/messages. Attachments are also handled properly in this demo app.

  7. Contact me in case you have any issues. link: www.codebeerstartups.com/contact/

See a blog post on the same code

  1. More information about this application can be found at:

http://www.codebeerstartups.com/2013/01/how-to-fetch-and-parse-emails-in-ruby-on-rails/