fix mail cron send mail del log
This commit is contained in:
parent
7e87b3c96b
commit
a296b1d6e3
|
@ -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
|
||||
|
||||
@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