sendhub 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sendhub/client.rb +1 -1
- data/lib/sendhub/plugins/rails3.rb +10 -2
- metadata +3 -3
data/lib/sendhub/client.rb
CHANGED
@@ -9,17 +9,25 @@ module Sendhub
|
|
9
9
|
|
10
10
|
def deliver!(message)
|
11
11
|
|
12
|
+
body = message.body
|
13
|
+
body = collect_parts(message) if message.multipart?
|
14
|
+
|
12
15
|
res = @client.send_email(
|
13
16
|
:from => message.from,
|
14
17
|
:to => message.to,
|
15
18
|
:reply_to => message.reply_to,
|
16
19
|
:subject => message.subject,
|
17
|
-
:body =>
|
18
|
-
:content_type => message.content_type
|
20
|
+
:body => body,
|
21
|
+
:content_type => message.content_type,
|
22
|
+
:content_transfer_encoding => message.content_transfer_encoding
|
19
23
|
)
|
20
24
|
|
21
25
|
puts res.inspect
|
22
26
|
end
|
27
|
+
|
28
|
+
def collect_parts(message)
|
29
|
+
message.parts.inject("\n\n\n") {|x, part| x << "--#{message.boundary}\n"; x << "#{part.to_s}\n\n"}
|
30
|
+
end
|
23
31
|
end
|
24
32
|
end
|
25
33
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sendhub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.16
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Richard Taylor
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-07-08 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
requirements: []
|
69
69
|
|
70
70
|
rubyforge_project: sendhub
|
71
|
-
rubygems_version: 1.
|
71
|
+
rubygems_version: 1.6.2
|
72
72
|
signing_key:
|
73
73
|
specification_version: 2
|
74
74
|
summary: sendhub is a Ruby client library for SendHub.net.
|