title: Sendgrid, Rails application, Mailer and Heroku configuring email the first time
body: <p>Hi I am building a feature where upon signing up, the user can receive an outbound email to their email box thanking them for singing up.</p>
  
  <p>This is my first time configuring email on my rails application.</p>
  
  <p>As far as I know I need to </p>
  
  <ol>
  <li>generate a mailer </li>
  <li>pass in the user model and user.email to my mailer.rb</li>
  <li>write the signup confirmation.txt template generated in the view </li>
  <li>call the mailer.signup.delivery method and pass in the user model in the controller </li>
  </ol>
  
  <p>all from this railscast, <a href="http://railscasts.com/episodes/61-sending-email-revised" rel="nofollow">http://railscasts.com/episodes/61-sending-email-revised</a></p>
  
  <p>hopefully I got the ideas right can someone confirm,</p>
  
  <p>I am more worried about implementing sendgrid and heroku, currently I am waiting for my sendgrid provision to finish. (I just signed up) </p>
  
  <p>from sendgrid api, i need to paste this into my environment.rb to enable sendgrid</p>
  
  <pre><code>ActionMailer::Base.smtp_settings = {
    :address        =&gt; 'smtp.sendgrid.net',
    :port           =&gt; '587',
    :authentication =&gt; :plain,
    :user_name      =&gt; ENV['SENDGRID_USERNAME'],
    :password       =&gt; ENV['SENDGRID_PASSWORD'],
    :domain         =&gt; 'heroku.com',
    :enable_starttls_auto =&gt; true
  }
  </code></pre>
  
  <p>add the sendgrid add on onto heroku (I did that) and set the sengrid username and password on heroku according to the heroku sendgrid docs.</p>
  
  <p>Am I doing this correctly? the last time I configured ssl on heroku, the docs were wrong and I ended up spending two days on a couple of tutorials. before I go ahead and mess with my application</p>
  
  <p>can someone confirm I am doing this correctly?</p>