ruby - Rails ActionMailer receive method does nothing -


i'm following rails official doc action mailer receive method , testing rails runner 'usermailer.receive(stdin.read)' command nothing happens.

class usermailer < actionmailer::base   add_template_helper emailhelper   default from: "xx@xxx.xxx"    def user_created(params)     @user = user.find params[0]     @creator = user.find params[1]     if @user && @creator         mail(to: @user.email, subject: "......").deliver     else         logger.info "......"     end   end    def receive(email)     puts yaml::dump email   end end 

here's detail rails app

rails@4.1.6 actionmailer@4.1.5 

the usermailer sends emails can not receive them. ideas?

i think want refer action mailer basics guide: http://guides.rubyonrails.org/action_mailer_basics.html#receiving-emails

i'm interpreting suggestion mean: configure mail server/process "pipe into" rails runner script... account stdin.read; contents of mail message passed script.

hth.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -