I am trying to test the working of mailer. Normally on rails I first test my code logic on console level and then once it is successful I put it into the real source code. I am trying to do the same while working on ApplicationMailer. I followed some other solution and first ran the following on rails console to first set up the ActionMailer

```
ActionMailer::Base.delivery_method = :smtp 
ActionMailer::Base.smtp_settings = {
  address: 'smtp.gmail.com', 
  port: 587, 
  domain: 'gmail.com',
  authentication: 'plain', 
  enable_starttls_auto: true, 
  user_name: '***********',
  password: '******'
}

```

and then I ran my code:

```
y.include? x
  if true
    @receiver = Model.where(category_id: "#{x}").pluck(:email)
    mail(to: @receiver, subject: @subject)
  end

```

I'm getting the following error: 

```
NoMethodError: undefined method `mail' for main:Object
    from (irb):19

```

Could somebody please tell me how make this work on rails console?