mattmatt-cijoe 0.1.4 → 0.1.5

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.
@@ -17,7 +17,8 @@ class CIJoe
17
17
  puts "\tuser = horst"
18
18
  puts "\tpass = passw0rd"
19
19
  puts "\thost = mail.example.com"
20
- puts "\tauthtype = login"
20
+ puts "\tauthtype = plain"
21
+ puts "\tenabletls = 1"
21
22
  end
22
23
  end
23
24
 
@@ -27,7 +28,8 @@ class CIJoe
27
28
  :user => Config.email.user.to_s,
28
29
  :pass => Config.email.pass.to_s,
29
30
  :host => Config.email.host.to_s,
30
- :auth_type => Config.email.authtype.to_s
31
+ :auth_type => Config.email.authtype.to_s,
32
+ :enable_tls => Config.email.enabletls.to_i
31
33
  }
32
34
  end
33
35
 
@@ -53,6 +55,7 @@ class CIJoe
53
55
  config.auth_pass = Email.config[:pass]
54
56
  config.auth_type = Email.config[:auth_type].to_sym
55
57
  config.host = Email.config[:host]
58
+ config.enable_tls = Email.config[:enable_tls] == 1 ? true : false
56
59
  config
57
60
  end
58
61
 
@@ -1,3 +1,3 @@
1
1
  class CIJoe
2
- Version = "0.1.4"
2
+ Version = "0.1.5"
3
3
  end
@@ -109,7 +109,7 @@ module MmMail
109
109
  #
110
110
  # @param [#to_s] message the message to send
111
111
  def mail_smtp(message)
112
- Net::SMTP.enable_tls
112
+ Net::SMTP.enable_tls if config.enable_tls
113
113
  Net::SMTP.start(config.host, config.port, 'localhost.localdomain',
114
114
  config.auth_user, config.auth_pass, config.auth_type) do |smtp|
115
115
  smtp.send_message(message.to_s, message.from, message.recipients_list)
@@ -58,7 +58,6 @@ Net::SMTP.class_eval do
58
58
  sock = timeout(@open_timeout) {TCPSocket.open(@address, @port) }
59
59
  @socket = Net::InternetMessageIO.new(sock)
60
60
  @socket.read_timeout = @read_timeout
61
- @socket.debug_output = STDERR
62
61
 
63
62
  check_response(critical {recv_response() } )
64
63
  do_helo(helodomain)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mattmatt-cijoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath