19 lines
325 B
Ruby
19 lines
325 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module EmailAction
|
||
|
class CronMapping < Base
|
||
|
|
||
|
def process(email)
|
||
|
if email.header_values("X-Cron-Env").present?
|
||
|
email.cron = true
|
||
|
end
|
||
|
if email.subject.present? && email.subject.match?(/cron/i)
|
||
|
email.cron = true
|
||
|
end
|
||
|
|
||
|
email
|
||
|
end
|
||
|
|
||
|
end
|
||
|
end
|