def deliver!(mail)
      check_delivery_params(mail) if respond_to?(:check_delivery_params)

      clean_up

      basepath = File.join(settings[:location], Time.now.to_i.to_s)

      save_email(mail, basepath)

      return true unless mail.attachments.any?

      add_attachments(mail, basepath)
    end
def deliver!(mail)
      check_delivery_params(mail) if respond_to?(:check_delivery_params)

      clean_up

      basepath = File.join(settings[:location], Time.now.to_i.to_s)

      save_email(mail, basepath)

      return true unless mail.attachments.any?

      add_attachments(mail, basepath)
    end
rubocop:disable Style/GuardClause
 rubocop:enable Style/GuardClause