Hi,
Thanks for your great gem !!
However, I tried to make a weekly email to be sent to all users, but it doesn't send emails in production.
Here is my user.rb
def self.weekly
@users = User.all
@users.each do |u|
UserMailer.weekly(u.email).deliver
end
end
# email test
def self.testing
UserMailer.testing(@me).deliver
end
My user_mailer.rb
def weekly(email)
mail(
:to => email,
:subject => "My title"
)
end
def testing(me)
@me = me
mail(
:to => me,
:subject => "testons cela"
)
end
And my schedule.rb
every :monday, :at => '09:59 am' do
runner "User.testing"
end
every :monday, :at => '11:30 am' do
runner "User.weekly"
end
_______
The testing email works, but not the weekly email.
I've updated the crontab properly for all emails (the testing one as well as the weekly one), but the weekly still doesn't work.
I've run it from the rails console and it works, but in production nothing is sent regarding the weekly email (to all users).
The only thing I get is a "You have a mail var/mail/[root]" message when a check heroku logs
Could you help, please?
Many thanks