Permalink
Browse files

fixing a bug where not defining SENDGRID_DEBUG_OUTPUT caused problems.

  • Loading branch information...
1 parent 5ca69f9 commit 61b32f4b773959ff1e59b1aa22470f0f9f4b7c6a @stephenb committed Nov 10, 2009
Showing with 14 additions and 2 deletions.
  1. +13 −1 README.textile
  2. +1 −1 lib/sendgrid.rb
View
@@ -8,7 +8,19 @@ Visit "SendGrid":http://sendgrid.com to learn more.
h3. Getting Started
-First of all, you'll need the gem. "Click here to get it from gemcutter":http://gemcutter.org/gems/sendgrid.
+First of all, you'll need the gem. You can add sendgrid to your Rails requirements:
+<pre>
+ config.gem "sendgrid", :source => 'http://gemcutter.org'
+</pre>
+
+Or, you can install it as a gem:
+<pre>
+ # if you haven't already, add gemcutter to your gem sources
+ sudo gem install gemcutter
+ gem tumble
+ # install sendgrid
+ sudo gem install sendgrid
+</pre>
Before you can do anything with the sendgrid gem, you'll need to create your very own SendGrid account. Go ahead and do so at "http://sendgrid.com":http://sendgrid.com (there's even a FREE account option).
View
@@ -106,7 +106,7 @@ def sendgrid_spamcheck_maxscore(score)
# Sets the custom X-SMTPAPI header before sending the email
def perform_delivery_smtp(mail)
- puts "SendGrid X-SMTPAPI: #{sendgrid_json_headers(mail)}" if SENDGRID_DEBUG_OUTPUT
+ puts "SendGrid X-SMTPAPI: #{sendgrid_json_headers(mail)}" if Object.const_defined?("SENDGRID_DEBUG_OUTPUT") && SENDGRID_DEBUG_OUTPUT
headers['X-SMTPAPI'] = sendgrid_json_headers(mail)
super
end

0 comments on commit 61b32f4

Please sign in to comment.