def deliver!(mail)
      unless settings[:append_emails] == false
        original_emails = email_list(mail)
      end

      %w{ to cc bcc }.each do |field|
        mail.send(:"#{field}=", filter_emails(mail.send(field)))
      end

      unless settings[:append_emails] == false
        new_emails = original_emails - email_list(mail)
        if !new_emails.empty?
          mail.body = "#{mail.body}\n\nExtracted Recipients: #{new_emails.join(', ')}"
        end
      end

      if settings[:subject_prefix]
        mail.subject = settings[:subject_prefix] + mail.subject
      end

      @delivery_method.deliver!(mail) unless mail.to.blank?

      mail
    end
def deliver!(mail)
      unless settings[:append_emails] == false
        original_emails = email_list(mail)
      end

      %w{ to cc bcc }.each do |field|
        mail.send(:"#{field}=", filter_emails(mail.send(field)))
      end

      unless settings[:append_emails] == false
        new_emails = original_emails - email_list(mail)
        if !new_emails.empty?
          mail.body = "#{mail.body}\n\nExtracted Recipients: #{new_emails.join(', ')}"
        end
      end

      if settings[:subject_prefix]
        mail.subject = settings[:subject_prefix] + mail.subject
      end

      @delivery_method.deliver!(mail) unless mail.to.blank?

      mail
    end
Public: Filter out recipients who may match the whitelist regex.
 If no emails are present after being filtered, don't deliver the email.

 mail - Mail object containing headers and body.

 Returns instance of Mail::Message.