fix mail cron send mail del log
This commit is contained in:
parent
cc82387efb
commit
0c03ba8439
|
@ -63,7 +63,6 @@ class MailCronMailer < ActionMailer::Base
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
@mail_cron_log = {
|
||||
:mail_subject => @data.mail_subject,
|
||||
:mail_to => group_mail,
|
||||
|
@ -74,10 +73,16 @@ class MailCronMailer < ActionMailer::Base
|
|||
|
||||
@mail_cron_log = MailCronLog.new(@mail_cron_log)
|
||||
|
||||
|
||||
@mail_cron_log.save
|
||||
|
||||
@data.destroy
|
||||
@mail_to_count = @data.mail_to.split(',') - group_mail.split(',')
|
||||
|
||||
if @mail_to_count.count == 0
|
||||
@data.destroy
|
||||
else
|
||||
@data.mail_to = @mail_to_count.join(',')
|
||||
@data.save
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue