Commit d56b0609412abadd0ee55e4779def9a72690c85d
1 parent
94bd62bb
Exists in
master
add README.md
Showing
2 changed files
with
33 additions
and
0 deletions
Show diff stats
README.md
1 | 1 | # sendcloud_rails |
2 | 2 | |
3 | 3 | Thanks for jorgemanrubia("https://github.com/jorgemanrubia/mailgun_rails") |
4 | + | |
5 | +*sendcloud_rails* is an Action Mailer adapter for using [Sendcloud](http://sendcloud.sohu.com/) in Rails apps. It uses the [Sendcloud HTTP API](http://sendcloud.sohu.com/doc/email_v2/code/#ruby) internally. | |
6 | + | |
7 | +## Installing | |
8 | + | |
9 | +In your `Gemfile` | |
10 | + | |
11 | +```ruby | |
12 | +gem 'sendcloud_rails' | |
13 | +``` | |
14 | + | |
15 | +## Usage | |
16 | + | |
17 | +To configure your sendcloud credentials place the following code in the corresponding environment file (`development.rb`, `production.rb`...) | |
18 | + | |
19 | +```ruby | |
20 | +config.action_mailer.delivery_method = :sendcloud | |
21 | +config.action_mailer.mailgun_settings = { | |
22 | + api_user: '<apiUser>', | |
23 | + api_key: '<apiKey>', | |
24 | + api_url: 'http://api.sendcloud.net/apiv2/mail/send' | |
25 | +} | |
26 | +``` | |
27 | + | |
28 | +Now you can send emails using plain Action Mailer: | |
29 | + | |
30 | +```ruby | |
31 | +email = mail from: 'sender@email.com', to: 'receiver@email.com', subject: 'this is an email' | |
32 | +``` | |
33 | + | |
34 | +Pull requests are welcomed | |
35 | + | |
36 | + | ... | ... |
sendcloud_rails-0.0.1.gem
No preview for this file type