You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: admin_mailer.rb
    path of file: ./repos/qpixel/app/mailers
    
    the code of the file until where you have to start completion: class AdminMailer < ApplicationMailer
  default from: lambda {
                  "#{SiteSetting['ModeratorDistributionListSenderName']} " \
                    "<#{SiteSetting['ModeratorDistributionListSenderEmail']}>"
                }

  def to_moderators
    @subject = params[:subject]
    @body_markdown = params[:body_markdown]
    query = 'SELECT DISTINCT u.email FROM subscriptions s INNER JOIN users u ON s.user_id = u.id ' \
            "INNER JOIN community_users cu
    
  def to_moderators
    @subject = params[:subject]
    @body_markdown = params[:body_markdown]
    query = 'SELECT DISTINCT u.email FROM subscriptions s INNER JOIN users u ON s.user_id = u.id ' \
            "INNER JOIN community_users cu ON cu.user_id = u.id WHERE s.type = 'moderators' AND " \
            '(u.is_global_admin = 1 OR u.is_global_moderator = 1 OR cu.is_admin = 1 OR cu.is_moderator = 1)'
    emails = ActiveRecord::Base.connection.execute(query).to_a.flatten
    from = "#{SiteSetting['ModeratorDistributionListSenderName']} " \
           "<#{SiteSetting['ModeratorDistributionListSenderEmail']}>"
    to = SiteSetting['ModeratorDistributionListSenderEmail']
    mail subject: "Codidact Moderators: #{@subject}", to: to, from: from, bcc: emails
  end