gmailer 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/gmailer.gempsec +1 -1
- data/gmailer.rb +28 -14
- metadata +2 -2
data/CHANGES
CHANGED
data/gmailer.gempsec
CHANGED
data/gmailer.rb
CHANGED
@@ -52,7 +52,7 @@ GM_ACT_DELSPAM = 20 # delete spam, forever
|
|
52
52
|
GM_ACT_DELTRASH = 21 # delete trash message, forever
|
53
53
|
|
54
54
|
module GMailer
|
55
|
-
VERSION = "0.1.
|
55
|
+
VERSION = "0.1.5"
|
56
56
|
attr_accessor :connection
|
57
57
|
|
58
58
|
# the main class.
|
@@ -168,23 +168,37 @@ module GMailer
|
|
168
168
|
np.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
169
169
|
result = ''
|
170
170
|
response = nil
|
171
|
-
|
171
|
+
# np.set_debug_output($stderr)
|
172
172
|
np.start { |http|
|
173
173
|
response = http.get(arr[5]+'?'+arr[7], {'Cookie' => cookies,'User-agent' => GM_USER_AGENT} )
|
174
174
|
result = response.body
|
175
175
|
}
|
176
176
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
177
|
+
if result.include?("Redirecting") && result =~ /url='(.+?)'/
|
178
|
+
url = $1.gsub("&","&")
|
179
|
+
result = ''
|
180
|
+
cookies += ';'+ __cookies(response['set-cookie'])
|
181
|
+
response = nil
|
182
|
+
# np.set_debug_output($stderr)
|
183
|
+
np.start { |http|
|
184
|
+
response = http.get(url, {'Cookie' => cookies,'User-agent'=> GM_USER_AGENT} )
|
185
|
+
result = response.body
|
186
|
+
}
|
187
|
+
end
|
188
|
+
|
189
|
+
if response["Location"]!=nil
|
190
|
+
arr = URI::split(response["Location"])
|
191
|
+
np = Net::HTTP::Proxy(@proxy_host,@proxy_port,@proxy_user,@proxy_pass).new(arr[2], 443)
|
192
|
+
np.use_ssl = true
|
193
|
+
np.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
194
|
+
result = ''
|
195
|
+
response = nil
|
196
|
+
# np.set_debug_output($stderr)
|
197
|
+
np.start { |http|
|
198
|
+
response = http.get(arr[5]+'?'+arr[7], {'Cookie' => cookies,'User-agent' => GM_USER_AGENT} )
|
199
|
+
result = response.body
|
200
|
+
}
|
201
|
+
end
|
188
202
|
|
189
203
|
@loc = "http://mail.google.com/mail/"
|
190
204
|
cookies += ';' + __cookies(response['set-cookie'])
|
@@ -985,7 +999,7 @@ module GMailer
|
|
985
999
|
postdata["bcc"] = stripslashes(bcc)
|
986
1000
|
|
987
1001
|
postdata["cmid"] = 1
|
988
|
-
postdata["ishtml"] = 0
|
1002
|
+
postdata["ishtml"] = param[:ishtml] || 0
|
989
1003
|
|
990
1004
|
cc = @cookie_str.split(';')
|
991
1005
|
cc.each {|cc_part|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: gmailer
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date:
|
6
|
+
version: 0.1.5
|
7
|
+
date: 2007-01-25 00:00:00 +09:00
|
8
8
|
summary: An class interface of the Google's webmail service
|
9
9
|
require_paths:
|
10
10
|
- ""
|