maedana-ar_mailer 2.1.5.1 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ = 2.1.6
2
+
3
+ * Add 'smtp_failover_activerecord'. 'smtp_failover_activerecord' allows you to store db if a mail send failed by smtp.
4
+ * Use multiple SMTP accounts for sending email.
5
+
1
6
  = 2.1.5
2
7
 
3
8
  * Bugs fixed
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ $:.unshift(File.expand_path(File.dirname(__FILE__) + '/lib'))
8
8
  require './lib/action_mailer/ar_sendmail'
9
9
 
10
10
  ar_mailer_gemspec = Gem::Specification.new do |s|
11
- s.name = %q{ar_mailer}
11
+ s.name = %q{maedana-ar_mailer}
12
12
  s.version = ActionMailer::ARSendmail::VERSION
13
13
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
14
14
  s.authors = ["Eric Hodel", "Adam Meehan"]
@@ -35,9 +35,10 @@ class ActionMailer::Base
35
35
  mail.ready_to_send
36
36
  sender = (mail['return-path'] && mail['return-path'].spec) || mail['from']
37
37
 
38
+ user_names = (smtp_settings[:user] || smtp_settings[:user_name]).to_a
38
39
  settings = [
39
40
  smtp_settings[:domain],
40
- (smtp_settings[:user] || smtp_settings[:user_name]),
41
+ user_names[rand(user_names.size)],
41
42
  smtp_settings[:password],
42
43
  smtp_settings[:authentication]
43
44
  ]
@@ -42,7 +42,7 @@ class ActionMailer::ARSendmail
42
42
  ##
43
43
  # The version of ActionMailer::ARSendmail you are running.
44
44
 
45
- VERSION = '2.1.5'
45
+ VERSION = '2.1.6'
46
46
 
47
47
  ##
48
48
  # Maximum number of times authentication will be consecutively retried
@@ -357,9 +357,10 @@ class ActionMailer::ARSendmail
357
357
  # Delivers +emails+ to ActionMailer's SMTP server and destroys them.
358
358
 
359
359
  def deliver(emails)
360
+ user_names = (smtp_settings[:user] || smtp_settings[:user_name]).to_a
360
361
  settings = [
361
362
  smtp_settings[:domain],
362
- (smtp_settings[:user] || smtp_settings[:user_name]),
363
+ user_names[rand(user_names.size)],
363
364
  smtp_settings[:password],
364
365
  smtp_settings[:authentication]
365
366
  ]
@@ -381,10 +382,8 @@ class ActionMailer::ARSendmail
381
382
  log "sent email %011d from %s to %s: %p" %
382
383
  [email.id, email.from, email.to, res]
383
384
  rescue Net::SMTPFatalError => e
384
- log "5xx error sending email %d, removing from queue: %p(%s):\n\t%s" %
385
- [email.id, e.message, e.class, e.backtrace.join("\n\t")]
386
- email.destroy
387
- session.reset
385
+ log "5xx error sending email #{email.id}: #{e.message}"
386
+ raise e
388
387
  rescue Net::SMTPServerBusy => e
389
388
  log "server too busy, sleeping #{@delay} seconds"
390
389
  sleep delay
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maedana-ar_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5.1
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-07-06 00:00:00 -07:00
13
+ date: 2009-10-01 00:00:00 +09:00
14
14
  default_executable: ar_sendmail
15
15
  dependencies: []
16
16
 
@@ -43,9 +43,10 @@ files:
43
43
  - test/test_armailer.rb
44
44
  - test/test_arsendmail.rb
45
45
  - test/test_helper.rb
46
- has_rdoc: false
46
+ has_rdoc: true
47
47
  homepage: http://github.com/adzap/ar_mailer
48
- licenses:
48
+ licenses: []
49
+
49
50
  post_install_message:
50
51
  rdoc_options:
51
52
  - --main
@@ -67,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
68
  requirements: []
68
69
 
69
70
  rubyforge_project: seattlerb
70
- rubygems_version: 1.3.5
71
+ rubygems_version: 1.3.4
71
72
  signing_key:
72
73
  specification_version: 3
73
74
  summary: A two-phase delivery agent for ActionMailer