simple_mailer 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +3 -4
  2. data/lib/simple_mailer.rb +2 -1
  3. metadata +6 -4
data/README CHANGED
@@ -9,8 +9,7 @@ array.
9
9
 
10
10
  simple_mailer can be installed with:
11
11
 
12
- sudo gem install jeremyevans-simple_mailer \
13
- --source=http://gems.github.com
12
+ sudo gem install simple_mailer
14
13
 
15
14
  Source is available at github:
16
15
  http://github.com/jeremyevans/simple_mailer
@@ -26,7 +25,7 @@ immediately:
26
25
  SimpleMailer.send_email('from@from.com', 'to@to.com', 'Subject',
27
26
  'Body', 'HeaderKey'=>'HeaderValue')
28
27
 
29
- SimpleMailer is a module that can be included in other classes:
28
+ Or, you can include the SimpleMailer module in other classes:
30
29
 
31
30
  class Mailer
32
31
  include SimpleMailer
@@ -51,7 +50,7 @@ are available via the emails_sent option:
51
50
 
52
51
  SimpleMailer.test_mode!
53
52
  SimpleMailer.emails_sent # []
54
- SimpleMailer.send_email('from@from.com', 'to@to.com', 'S, 'B')
53
+ SimpleMailer.send_email('from@from.com', 'to@to.com', 'S', 'B')
55
54
  SimpleMailer.emails_sent # [[message, 'from@from.com', 'to@to.com']]
56
55
 
57
56
  == Author
data/lib/simple_mailer.rb CHANGED
@@ -48,7 +48,7 @@ module SimpleMailer
48
48
  # Formats email message using from address, to address, subject, message,
49
49
  # and header hash. Arguments:
50
50
  # * from - From address for the message
51
- # * to - To address for the message
51
+ # * to - To address for the message (string or array of strings)
52
52
  # * subject - Subject of the message
53
53
  # * message - Body of the message
54
54
  # * headers - Headers for the message. Also, handles the following keys
@@ -64,6 +64,7 @@ module SimpleMailer
64
64
  def send_email(from, to, subject, message, headers={})
65
65
  smtp_from = headers.delete(:smtp_from) || from
66
66
  smtp_to = headers.delete(:smtp_to) || to
67
+ to = to.join(", ") if to.is_a?(Array)
67
68
  _send_email(<<END_OF_MESSAGE, smtp_from, smtp_to)
68
69
  From: #{from}
69
70
  To: #{to}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-08 00:00:00 -07:00
12
+ date: 2009-12-30 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,6 +28,8 @@ files:
28
28
  - spec/simple_mailer.rb
29
29
  has_rdoc: true
30
30
  homepage:
31
+ licenses: []
32
+
31
33
  post_install_message:
32
34
  rdoc_options:
33
35
  - --inline-source
@@ -51,9 +53,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
53
  requirements: []
52
54
 
53
55
  rubyforge_project:
54
- rubygems_version: 1.3.1
56
+ rubygems_version: 1.3.5
55
57
  signing_key:
56
- specification_version: 2
58
+ specification_version: 3
57
59
  summary: Simple email library with testing support
58
60
  test_files: []
59
61