Closed aman199002 closed 12 years ago
@aman199002 you can set ActionMailer::Base.delivery_method = :smtp
before this piece of code and set ActionMailer::Base.delivery_method = :letter_opener
after.
I want to create some users in my seeds.rb. The delivery methods ruby :smtp
and ruby :test
both throw errors. On the development machines ruby :letter_opener
is no problem but on the teamcity server it is. Is it possible to add a setting to prevent the letter opener from opening?
@jnphilipp what errors are you getting with ActionMailer::Base.delivery_method = :test
?
@nashby At least one recipient (To, Cc or Bcc) is required to send a message
@jnphilipp well, looks like you don't have email in your seeded users or something like that. Not sure it's a problem with letter_opener
@nashby i added ActionMailer::Base.perform_deliveries = false
to the seeds.rb, now it works as it should, thanks.
@jnphilipp great! Thank you for letting us know.
I am creating dummy users using rake task for my application. An email is opened in bvrowser as I have integrated mail sending feature for user registration. Is there a way that I can disable letter_opener from opening email in browser only for rake tasks or some certain piece of code?