On Saturday, July 22, 2017 at 3:55:48 PM UTC+1, Aqib Hameed wrote:
> }I tried to run the command rails runner 'UserMailer.receive(STDIN.read)'
>
> But nothing happened even the email is incoming .It does not call the receive method
> Where should i call the receive method ??? How determine the incoming email ???
Receiving email is rather more involved than sending it.
To use rails runner as you've tried this command needs to be run on your email server, by the email serving program itself (i.e. sendmail itself). There are variants on this but they all boil down to running your own mail server, which you may not want to do
Alternatively there are services like sendgrid, cloudmailin, Amazon ses. You set you ready dns records to that email to your domain (or a subdomain) is handled by this service provider and they'll make a regular http(s) call to your app whenever an email is received.
Fred
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ab691251-b045-414f-8d00-458f984cbe1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment