app/mailers/user_mailer.rb
def new_client_notification(agent_email, name, role, insured_email, hbx_id)
    if agent_email.present?
      subject = l10n("user_mailer.new_client_notification_subject.full_text", name: name, insured_email: insured_email, site_short_name: site_short_name)
      mail({to: agent_email, subject: subject, from: "no-reply@individual.#{site_domain_name}"}) do |format|
        format.html { render "new_client_notification", :locals => { :role => role, name: name, hbx_id: hbx_id, email: insured_email }}
      end
    end
  end
### add_template_helper makes the view helper methods available in the Mailer templates. It does NOT make the methods available in the Mailer itself
### Thus we have to use Include in addition to add_template_helper
add_template_helper makes the view helper methods available in the Mailer templates. It does NOT make the methods available in the Mailer itself
Thus we have to use Include in addition to add_template_helper
add_template_helper makes the view helper methods available in the Mailer templates . It does NOT make the methods available in the Mailer itself Thus we have to use Include in addition to add_template_helper
def new_client_notification(agent_email, name, role, insured_email, hbx_id)
    if agent_email.present?
      subject = l10n("user_mailer.new_client_notification_subject.full_text", name: name, insured_email: insured_email, site_short_name: site_short_name)
      mail({to: agent_email, subject: subject, from: "no-reply@individual.#{site_domain_name}"}) do |format|
        format.html { render "new_client_notification", :locals => { :role => role, name: name, hbx_id: hbx_id, email: insured_email }}
      end
    end
  end
def new_client_notification ( agent_email , name , role , insured_email , hbx_id ) if agent_email . present? subject = l10n ( "user_mailer.new_client_notification_subject.full_text" , name : name , insured_email : insured_email , site_short_name : site_short_name ) mail ( { to : agent_email , subject : subject , from : "no-reply@individual.#{site_domain_name}" } ) do | format | format . html { render "new_client_notification" , :locals => { :role => role , name : name , hbx_id : hbx_id , email : insured_email } } end end end
add_template_helper makes the view helper methods available in the Mailer templates.
add_template_helper makes the view helper methods available in the Mailer templates .
agent_email
name
role
insured_email
hbx_id