emaildirect 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY.md +3 -0
- data/README.md +1 -1
- data/lib/emaildirect/mailer.rb +2 -0
- data/lib/emaildirect/version.rb +1 -1
- metadata +4 -4
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -88,7 +88,7 @@ Results in:
|
|
88
88
|
Error Code: 101
|
89
89
|
Error Message: Invalid Email Address
|
90
90
|
|
91
|
-
### Disabling
|
91
|
+
### Disabling for development/testing
|
92
92
|
A helper method is provided to disable talking to the EmailDirect REST server (requires the [Fakeweb gem](http://fakeweb.rubyforge.org/))
|
93
93
|
|
94
94
|
EmailDirect.disable
|
data/lib/emaildirect/mailer.rb
CHANGED
@@ -45,6 +45,8 @@ module EmailDirect
|
|
45
45
|
options[:Subject] = mail.subject
|
46
46
|
options[:Text] = mail.multipart? ? mail.text_part.body.to_s : mail.body.to_s
|
47
47
|
options[:HTML] = mail.multipart? ? mail.html_part.body.to_s : mail.body.to_s
|
48
|
+
# Emaildirect strips out newlines which can lead to words being smooshed together
|
49
|
+
options[:HTML].gsub! /[\r\n]+/, ' '
|
48
50
|
# Set the envelope from to be either the return-path, the sender or the first from address
|
49
51
|
envelope_from = mail.return_path || mail.sender || mail.from_addrs.first
|
50
52
|
unless envelope_from.blank?
|
data/lib/emaildirect/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emaildirect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason Rust
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-19 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|