Actionmailer HELP

Hi,
I want to receive emails with actionmailer.And I try to do this example:
http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer
I am working on windows and I couldn’t set up Actionmailer for windows.
How can I configure actionmailer for windows? I am glad,if anybody can
help me
Regards…

fitnat wrote:

Hi,
I want to receive emails with actionmailer.And I try to do this example:
http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer
I am working on windows and I couldn’t set up Actionmailer for windows.
How can I configure actionmailer for windows? I am glad,if anybody can
help me
Regards…

You need some sort of process/script that will receive the emails and
then you call the receive method on the actionmailer class. If you
google, you will find examples. However, here is a simple script that
you can use and start with the windows scheduler if necessary (or
backgrounDrb).

Regards,

Michael

#Very basic script to receive email from pop3 server

require ‘net/pop’
require File.dirname(FILE) + ‘/…/config/environment’

logger = RAILS_DEFAULT_LOGGER

logger.info “Running Mail Importer…”

Net::POP3.start(“mail.yourmailserver.com”, nil,
[email protected]”, “yourpassword”) do |pop|
if pop.mails.empty?
logger.info “No mail!”
else
pop.mails.each do |email|

	begin
		logger.info "Receiving email..."
                    #If you want to save it before processing
		tmpFileName = File.dirname(__FILE__) + 

“/yourdir/#{email.unique_id}.eml”
File.open(tmpFileName, “w”) { |f| f.write(email.pop) }
LeadMailer.receive(email.pop)
email.delete
rescue Exception => e
logger.error "Error receiving email at " + Time.now.to_s + "::: " +
e.message
end
end
end
end
logger.info “Finished Mail Importer…”

Hi,
I could receive emails with Net::POP3.And I have an receive method in
actionmailer class but the point I couldn’t understand is that how can I
check whether I receive mails with actionmailer or not. As you can
understand I new to ruby on rails :).If you can help me, I am happy.
Regards…