actionmailer-ironruby 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/actionmailer-ironruby.rb +16 -14
- metadata +1 -1
@@ -21,21 +21,24 @@
|
|
21
21
|
load_assembly 'System.Net'
|
22
22
|
|
23
23
|
module ActionMailer
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
include System::Net::Mail
|
24
|
+
class Base
|
25
|
+
include System::Net
|
26
|
+
include System::Net::Mail
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
28
|
+
@@ironruby_settings = {
|
29
|
+
:address => "localhost",
|
30
|
+
:port => 25,
|
31
|
+
:user_name => nil,
|
32
|
+
:password => nil,
|
33
|
+
:delivery_method => :network,
|
34
|
+
:delivery_folder => nil
|
35
|
+
}
|
36
|
+
cattr_accessor :ironruby_settings
|
37
37
|
|
38
|
-
|
38
|
+
private
|
39
|
+
def perform_delivery_ironruby(mail)
|
40
|
+
settings = ironruby_settings
|
41
|
+
|
39
42
|
message = MailMessage.new
|
40
43
|
|
41
44
|
message.From = MailAddress.new(mail.sender_addr.spec, mail.sender_addr.name)
|
@@ -74,6 +77,5 @@ module ActionMailer
|
|
74
77
|
smtp.Credentials = NetworkCredential.new(settings[:user_name], settings[:password]) if settings[:user_name] && settings[:password]
|
75
78
|
smtp.Send(message)
|
76
79
|
end
|
77
|
-
end
|
78
80
|
end
|
79
81
|
end
|