Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7637963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:03:44+00:00 2026-05-31T08:03:44+00:00

I have a button ‘buy’ which links to the ‘review’ page like so: <%=

  • 0

I have a button ‘buy’ which links to the ‘review’ page like so:

<%= button_to 'Buy', review_hvacs_path(:b => true, :h => hvac, :a => params[:a], :s => params[:s]) %>

This calls the review action in the controller, ‘hvacs_controller’ which contains..

@buy = params[:b]
if !@buy.nil?
  @currentHvac = Hvac.find(params[:h])
  @supplier = HvacSupplier.find(@currentHvac.hvac_supplier_id)
  Notifier.gmail_message(@supplier)
end

I am trying to send the message if the user presses the buy button.

My development environment looks like this:

  # Don't care if the mailer can't send
  config.action_mailer.raise_delivery_errors = false

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :enable_smarttls_auto => true,
    :address => 'smtp.gmail.com',
    :port => 587,
    :authentication => :plain,
    :domain => 'gmail.com',
    :username => '<my email address>@gmail.com',
    :password => '<my password>'
  }

…and my mailer looks like this:

class Notifier < ActionMailer::Base
  default from: "user@address.com"

  # Subject can be set in your I18n file at config/locales/en.yml
  # with the following lookup:
  #
  #   en.notifier.gmail_message.subject
  #
  def gmail_message(supplier)
    @greeting = "HVAC Equipment Purchase"
    @supplier = supplier

    mail(:to => supplier.email, :subject => "HVAC Equipment Enquiry")
  end
end

Message:

Notifier#gmail_message

<%= @greeting %>, I am interesting in purchasing replacement equipment, and would like an evaluation.

Would anyone have any insight? I am missing something? If I left out any details, I will post them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:03:45+00:00Added an answer on May 31, 2026 at 8:03 am

    Notifier.gmail_message(@supplier).deliver

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Button , which on clicking, displays a Dialog . Everything works like
I have button with id = new which loads the new page $(#new).click(function(){ $('#message_area').load('new.php');
I have button which post values of form to url but during post i
I have button, which fires an event, that deletes a record from the database.
I have a button called Download page at the bottom of my detailView of
I have button on the page that being used as a link to another
i have asp button like this: <asp:Button ID=ImportToDB runat=server OnClick=ImportToDB_Click /> And i need
I have a page which generates a html code in a text box. When
I have button, which i rotated 45 degrees using rotate animation and applied on
i have button, on a click of which i want to download the file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.