Configure actionmailer to recieve email on localhost?

hi, is there a way i can configure my localhost to receive email using
smtp? i can out emails fine but now would like to test/get-to-know how
to handle incoming emails.

if on my localhost:3000, do i do anything like below?

ActionMailer::Base.server_settings = {

:address=>‘smtp.yourserver.com’, # default: localhost
:port=>‘25’, # default: 25
:user_name=>‘user’,
:password=>‘pass’,
:authentication=>:plain # :plain, :login or :cram_md5
}

what do i use as an email address?

thanks

Il giorno 03/mar/07, alle ore 17:07, mixplate ha scritto:

:port=>‘25’, # default: 25
:user_name=>‘user’,
:password=>‘pass’,
:authentication=>:plain # :plain, :login or :cram_md5
}

what do i use as an email address?

Rails doesn’t care frome where you get your emails, you just have to
forward them using script/runner YourMailer.receive(email) or more
probably YourMailer.receive(STDIN.read).
Personally I use getmail, you can find some docs on the wiki.
The code you posted is for sending emails.
Receiving with SMTP is quite hard, you need POP3/imap.

Have fun !
ngw

mixplate wrote:

hi, is there a way i can configure my localhost to receive email using
smtp? i can out emails fine but now would like to test/get-to-know how
to handle incoming emails.

if on my localhost:3000, do i do anything like below?

ActionMailer::Base.server_settings = {

:address=>‘smtp.yourserver.com’, # default: localhost
:port=>‘25’, # default: 25
:user_name=>‘user’,
:password=>‘pass’,
:authentication=>:plain # :plain, :login or :cram_md5
}

what do i use as an email address?

thanks

If you are using unix based os (including Mac OSX), you can use

ActionMailer::Base.delivery_method = :sendmail

and configure your sendmail to send emails out (on Mac OSX by default
sendmail is disabled, you will have to enable it)

On 5-Mar-07, at 7:59 PM, Nicholas W. wrote:

if on my localhost:3000, do i do anything like below?

Have fun !
ngw

If you’re on osx, and trying to pop gmail (a narrow set of choices?),
this reference may help: http://involution.com/2006/07/20/access-
gmail-from-ruby-using-netpop3-and-stunnel/

cheers,
Jodi

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs