title: Sending mail for devise
body: <p>I am trying to send mail through sendgrid from my rails app. I have setup sendgrid previously. I was able to send and receive mail in the development and the production, through heroku. Everything worked for a day. I came back a couple of days later and nothing worked.</p>
  
  <p>There are no errors. In dev it says the mail is sent but the email doesn't send and same for production.</p>
  
  <p>Here is my setup:</p>
  
  <p><strong>development.rb</strong></p>
  
  <pre><code>config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  </code></pre>
  
  <p><strong>production.rb</strong></p>
  
  <pre><code>config.action_mailer.default_url_options = { host: 'herokuapp.com' }
  Rails.application.routes.default_url_options[:host] = 'herokuapp.com' 
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = false
  config.action_mailer.default :charset =&gt; "utf-8"
  </code></pre>
  
  <p><strong>setup_mail.rb</strong></p>
  
  <pre><code>ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
      address:                'smtp.sendgrid.net',
      port:                   '587',
      :authentication         =&gt; :plain,
      user_name:              'user',
      password:               'pass',
      domain:                 'herokuapp.com',
      enable_starttls_auto: true
  }
  </code></pre>
  
  <p>I have tried resetting my pass to sendgrid and removing then re-adding it but then I run into an error saying "user banned" and I am unable to re add it. </p>
  
  <p>I have also tried switching to postmark with similar results where the mail is never received but is sent.</p>