title: Name in Sendgrid Email with Rails
body: <p>I'm using <a href="http://careerfoundry.com" rel="nofollow">careerfoundry's</a> tutorial on using Sendgrid to send emails with Heroku.  I'm using their exact code for the user mailer and thank_you action in the pages controller.  This code is working for the most part.  The issue is that the subject line I receive in my inbox is this:</p>
  
  <p><strong>A new contact form message from #{name}</strong></p>
  
  <p>User_Mailer.rb</p>
  
  <pre><code>class UserMailer &lt; ActionMailer::Base
    default from: "from@example.com"
  
    def contact_form(email, name, message)
      @message = message
      mail(:from =&gt; email, 
              :to =&gt; 'your-email@example.com', 
              :subject =&gt; "A new contact form message from #{name}")
    end
  end
  </code></pre>
  
  <p>Contact Form</p>
  
  <pre><code>&lt;%= form_tag("/thank_you") do %&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-md-4"&gt;
          &lt;div class="input-group"&gt;
              &lt;%= text_field_tag :name, nil, class: 'form-control', placeholder: 'Name' %&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-md-8"&gt;
          &lt;div class="input-group"&gt;
            &lt;span class="input-group-addon" id="basic-addon1"&gt;@&lt;/span&gt;
            &lt;%= text_field_tag :email, nil, class: 'form-control', placeholder: 'Email' %&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-md-12"&gt;
          &lt;div class="input-group text-area-wide"&gt;
              &lt;%= text_area_tag :message, nil, class: 'form-control text-area-wide', placeholder: 'Message' %&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;%= submit_tag 'Send Message', class: 'btn btn-success' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Pages Controller</p>
  
  <pre><code>def thank_you
      @name = params[:name]
      @email = params[:email]
      @message = params[:message] || "Hello!"
      # Only try to send this email on a POST
      # if request.post?
      # or make a feedback form controller and send in the create action
  
      # ActionMailer::Base.mail( FOR TEST PURPOSES
      #     :from =&gt; @email, 
       #  :to =&gt; 'erikvdw@comcast.net', 
       #  :subject =&gt; "A new contact form message from #{@name}", 
       #  :body =&gt; @message).deliver
      UserMailer.contact_form(@email, @name, @message).deliver
  
    end
  </code></pre>