How do you send queued mail? #1105
Replies: 2 comments 4 replies
-
@BenSturmfels: In development, the job should be running but failing because you don't have an SMTP server on localhost. A good way to address this is to use something like https://github.com/maildev/maildev as your SMTP and preview app. (Feel free to add that to the docs!) To run jobs in production, you should follow the GoodJob instructions by running |
Beta Was this translation helpful? Give feedback.
-
Ah ok, I was hitting two issues here where the errors were being swallowed by the controller somehow and could only be seen if I set a debugger line breakpoint and call First issue was that GoodJob had some migrations it needed created and applied. Second issue is:
Here's the full detail from the debugger session:
|
Beta Was this translation helpful? Give feedback.
-
How do you configure outgoing email to send in development? When I click on a payment and "Resend to donor", I don't see anything interesting the console (eg. the email body) and nothing seems to go to my local sendmail equivalent from the logs.
Looking at
resend_donor_receipt()
, I can see that mail is stored as a queued job. How am I best to use this in development?Also, what's the best approach for configuring this in production? I see there's a commented line mentioning "resque" in config/environments/production.rb. I haven't used this before, but was imagining there'd be a command like
rails reque
to start a queue worker process, butrails help
doesn't list anything like this and I can't see "requeue" inGemfile
.Sorry for bombarding you!
Beta Was this translation helpful? Give feedback.
All reactions