jalcine-tlsmail 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tlsmail.rb +30 -0
- metadata +46 -0
data/lib/tlsmail.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require "net/smtp"
|
2
|
+
require "net/pop"
|
3
|
+
# If smtp or pop is already loaded, remove all constants.
|
4
|
+
module Net
|
5
|
+
if defined?(SMTP)
|
6
|
+
SMTP.class_eval do remove_const(:Revision) end
|
7
|
+
[:SMTP, :SMTPSession].each do |c|
|
8
|
+
remove_const(c) if constants.include?(c.to_s)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
if defined?(POP)
|
12
|
+
POP.class_eval do remove_const(:Revision) end
|
13
|
+
[:POP, :POPSession, :POP3Session, :APOPSession].each do |c|
|
14
|
+
remove_const(c) if constants.include?(c.to_s)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
load File.dirname(__FILE__) + "/net/smtp.rb"
|
20
|
+
load File.dirname(__FILE__) + "/net/pop.rb"
|
21
|
+
|
22
|
+
Net::SMTP.class_eval do
|
23
|
+
def quit # gmail smtp server disconnects as soon as get quit message.
|
24
|
+
begin
|
25
|
+
getok('QUIT')
|
26
|
+
rescue EOFError
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jalcine-tlsmail
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jacky Alcine
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-02 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: This gem provides SSL/TLS access to POP and SMTP servers by embedding
|
15
|
+
the libssl library in ruby 1.9.
|
16
|
+
email: me@jalcine.me
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/tlsmail.rb
|
22
|
+
homepage: http://rubygems.org/gems/tlsmail
|
23
|
+
licenses: []
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 1.8.24
|
43
|
+
signing_key:
|
44
|
+
specification_version: 3
|
45
|
+
summary: Hola!
|
46
|
+
test_files: []
|