2

I'm very new to mailman, just trying to create a handler so I can get notification when I receive new mail , something like that :

require "rubygems"
require "mailman"

Mailman.config.pop3 = {
  server: 'pop.gmail.com', port: 995, ssl: true,
  username: "email@gmail.com",
  password: "password"
}

Mailman::Application.run do
  default do
    puts message.subject
  end
end

Anyways for somereasone I keep getting long list of old emails subjects instead of the new one, I'm totally sure i'm doing something wrong here, but how can I make it just receive the new coming mails ?

Eqbal
  • 1,819
  • 2
  • 16
  • 25

0 Answers0