Hi, Since you're using Sinatra, ActionMailer was not automatically configured.
You need to set it up to read your credentials from config vars, like this: http://github.com/pedro/quick_sendgrid/raw/master/lib/quick_sendgrid.rb I'll make sure our docs on Sendgrid is updated to reflect that. Thanks, Pedro On Tue, Feb 2, 2010 at 9:52 AM, jajabak <[email protected]> wrote: > Hi, > > I'm trying to configure my sinatra app to send emails via Sendgrid. > Steps I have done so far: > > require 'sinatra/base' > require 'action_mailer' > > # my sinatra controller code > > class MyMailer < ActionMailer::Base > def email > recipients "[email protected]" > from "[email protected]" > subject "test email" > sent_on Time.now > body "This is a test." > end > end > > MyMailer.deliver_email > > The Heroku docs say, I don't need anything else beside this: > > heroku addons:add sendgrid:basic > > I was getting error (NilClass, NoMethodError in Heroku gem, def > format..) when 'heroku config'. > > There were some recommendations to do this: > > heroku addons:remove sendgrid:basic > heroku addons:add sendgrid:basic > > 'heroku config' now works fine. However, I'm still getting this error: > > Errno::ECONNREFUSED: Connection refused - connect(2) > > I tried to define the smtp arguments for ActionMailer manually > (extracted from the heroku config), however I got this error: > Errno::EAFNOSUPPORT: Address family not supported by protocol - socket > (2) > > Am I missing something? > Please help. > Thanks. > v. > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
