Skip to content

Commit

Permalink
updating README and removing some debug output.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenb committed Nov 8, 2009
1 parent 0e77415 commit 131f48a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Empty file removed README
Empty file.
21 changes: 13 additions & 8 deletions README.textile
Expand Up @@ -3,14 +3,19 @@ h1. sendgrid
h3. What is SendGrid? h3. What is SendGrid?


SendGrid is an awesome way to send large amounts of email (bells and whistles included) without spending large amounts of money. SendGrid is an awesome way to send large amounts of email (bells and whistles included) without spending large amounts of money.
This gem allows for painless integration with ActionMailer and the SendGrid API. This gem allows for painless integration with ActionMailer and the SendGrid API. The current scope of this gem
Visit http://sendgrid.com to learn more. is focused around setting configuration options for outgoing email (essentially, setting categories, filters and the settings that can accompany those filters). SendGrid's service allows for some other
cool stuff (such as postback notification of unsubscribes, bounces, etc.), but you'll have to integrate those features
on your own.
Visit "SendGrid":http://sendgrid.com to learn more.


h3. Getting Started h3. Getting Started


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 (there's even a FREE account option). First of all, you'll need the gem. "Click here to get it from gemcutter":http://gemcutter.org/gems/sendgrid.


Next, update your application's SMTP settings to use SendGrid's servers (see http://wiki.sendgrid.com/doku.php?id=get_started). 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).

Next, update your application's SMTP settings to use SendGrid's servers (see "SendGrid's getting started guide":http://wiki.sendgrid.com/doku.php?id=get_started for instructions).


Example: Example:
<pre> <pre>
Expand All @@ -26,7 +31,7 @@ ActionMailer::Base.smtp_settings = {


h3. Using the sendgrid Gem h3. Using the sendgrid Gem


If you do not already have an ActionMailer class up and running, then check out http://guides.rubyonrails.org/action_mailer_basics.html#walkthrough-to-generating-a-mailer If you do not already have an ActionMailer class up and running, then check out "this guide.":http://guides.rubyonrails.org/action_mailer_basics.html#walkthrough-to-generating-a-mailer


1) add the following line within your mailer class: 1) add the following line within your mailer class:
<pre> <pre>
Expand Down Expand Up @@ -68,7 +73,7 @@ end


Category settings can be any text you like and will allow you to view statistics per-category (very nice). There is also a custom global setting that will automatically use the subject-line of your email as the sendgrid_category: Category settings can be any text you like and will allow you to view statistics per-category (very nice). There is also a custom global setting that will automatically use the subject-line of your email as the sendgrid_category:
<pre> <pre>
sendgrid_category(:use_subject_lines) sendgrid_category :use_subject_lines
</pre> </pre>
Calling sendgrid_cateogry from within one of your mailer methods will override this global setting. Calling sendgrid_cateogry from within one of your mailer methods will override this global setting.


Expand All @@ -80,10 +85,10 @@ Here are a list of supported options for sendgrid_enable and sendgrid_disable:
- :subscriptiontrack - :subscriptiontrack
- Call sendgrid_subscriptiontrack_text(:html => 'Unsubscribe <% Here %>', :plain => 'Unsubscribe Here: <% %>') to set a custom format for html/plain or both. - Call sendgrid_subscriptiontrack_text(:html => 'Unsubscribe <% Here %>', :plain => 'Unsubscribe Here: <% %>') to set a custom format for html/plain or both.
- :footer - :footer
- Call sendgrid_footer_text(:html => 'My HTML footer rocks!', :plain => 'My plain text footer is so-so.') to set custom footer text for html/plain or both. - Call sendgrid_footer_text(:html => '<p>My HTML footer rocks!</p>', :plain => 'My plain text footer is so-so.') to set custom footer text for html/plain or both.
- :spamcheck - :spamcheck
- Call sendgrid_spamcheck_maxscore(4.5) to set a custom SpamAssassin threshold at which SendGrid drops emails (default value is 5.0). - Call sendgrid_spamcheck_maxscore(4.5) to set a custom SpamAssassin threshold at which SendGrid drops emails (default value is 5.0).


For further explanation see http://wiki.sendgrid.com/doku.php?id=filters For further explanation see "SendGrid's wiki page on filters.":http://wiki.sendgrid.com/doku.php?id=filters




2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -11,7 +11,7 @@ begin
gem.email = "stephenrb@gmail.com" gem.email = "stephenrb@gmail.com"
gem.homepage = "http://github.com/stephenb/sendgrid" gem.homepage = "http://github.com/stephenb/sendgrid"
gem.authors = ["Stephen Blankenship"] gem.authors = ["Stephen Blankenship"]
gem.add_development_dependency "thoughtbot-shoulda" # gem.add_development_dependency "thoughtbot-shoulda"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end end
Jeweler::GemcutterTasks.new Jeweler::GemcutterTasks.new
Expand Down
1 change: 0 additions & 1 deletion lib/sendgrid.rb
Expand Up @@ -106,7 +106,6 @@ def sendgrid_spamcheck_maxscore(score)


# Sets the custom X-SMTPAPI header before sending the email # Sets the custom X-SMTPAPI header before sending the email
def perform_delivery_smtp(mail) def perform_delivery_smtp(mail)
puts sendgrid_json_headers(mail)
headers['X-SMTPAPI'] = sendgrid_json_headers(mail) headers['X-SMTPAPI'] = sendgrid_json_headers(mail)
super super
end end
Expand Down

0 comments on commit 131f48a

Please sign in to comment.