gmailer 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGES +3 -0
  2. data/gmailer.gempsec +1 -1
  3. data/gmailer.rb +11 -11
  4. metadata +2 -2
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.2.1 - 22-Dec-2007
2
+ - fix send message problem with some accounts
3
+
1
4
  == 0.2.0 - 20-Nov-2007
2
5
  - fix connection problem with some accounts again
3
6
 
@@ -2,7 +2,7 @@ require "rubygems"
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
4
  gem.name = "gmailer"
5
- gem.version = "0.2.0"
5
+ gem.version = "0.2.1"
6
6
  gem.author = "Park Heesob"
7
7
  gem.email = "phasis_AT_gmail.com"
8
8
  gem.homepage = "http://rubyforge.org/projects/gmailutils"
data/gmailer.rb CHANGED
@@ -10,7 +10,7 @@ DEBUG = false
10
10
 
11
11
  require 'net/https'
12
12
 
13
- GM_LNK_GMAIL = "/mail/"
13
+ GM_LNK_GMAIL = "/mail/?ui=1"
14
14
  GM_LNK_HOST = "mail.google.com"
15
15
  GM_LNK_LOGIN = "/accounts/ServiceLoginAuth"
16
16
  GM_LNK_LOGOUT = "/mail/?logout"
@@ -270,7 +270,7 @@ module GMailer
270
270
  np.set_debug_output($stdout) if DEBUG
271
271
  inbox = ''
272
272
  np.start { |http|
273
- response = http.get(GM_LNK_GMAIL + "?ui=1&" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
273
+ response = http.get(GM_LNK_GMAIL + "&" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
274
274
  inbox = response.body
275
275
  }
276
276
  if @type == GM_SHOWORIGINAL
@@ -1035,7 +1035,7 @@ module GMailer
1035
1035
  query += "&zv=" + (rand(2000)*2147483.648).to_i.to_s
1036
1036
  np = Net::HTTP::Proxy(@proxy_host,@proxy_port,@proxy_user,@proxy_pass).new(GM_LNK_HOST, 80)
1037
1037
  np.start { |http|
1038
- response = http.get(GM_LNK_GMAIL + "?"+query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
1038
+ response = http.get(GM_LNK_GMAIL + "&" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
1039
1039
  page = response.body
1040
1040
  }
1041
1041
  else # not logged in yet
@@ -1193,11 +1193,11 @@ module GMailer
1193
1193
  postdata += "&vp="
1194
1194
 
1195
1195
  if [GM_ACT_UNTRASH,GM_ACT_DELFOREVER,GM_ACT_DELTRASH].include?(act)
1196
- link = GM_LNK_GMAIL+"?search=trash&view=tl&start=0"
1196
+ link = GM_LNK_GMAIL+"&search=trash&view=tl&start=0"
1197
1197
  elsif (act == GM_ACT_DELSPAM)
1198
- link = GM_LNK_GMAIL+"?search=spam&view=tl&start=0"
1198
+ link = GM_LNK_GMAIL+"&search=spam&view=tl&start=0"
1199
1199
  else
1200
- link = GM_LNK_GMAIL+"?search=query&q=&view=tl&start=0"
1200
+ link = GM_LNK_GMAIL+"&search=query&q=&view=tl&start=0"
1201
1201
  end
1202
1202
 
1203
1203
  np = Net::HTTP::Proxy(@proxy_host,@proxy_port,@proxy_user,@proxy_pass).new(GM_LNK_HOST, 80)
@@ -1283,7 +1283,7 @@ module GMailer
1283
1283
 
1284
1284
  postdata += "&at=" + at_value
1285
1285
 
1286
- link = GM_LNK_GMAIL + "?view=ii"
1286
+ link = GM_LNK_GMAIL + "&view=ii"
1287
1287
 
1288
1288
  np = Net::HTTP::Proxy(@proxy_host,@proxy_port,@proxy_user,@proxy_pass).new(GM_LNK_HOST, 443)
1289
1289
  np.use_ssl = true
@@ -1419,7 +1419,7 @@ module GMailer
1419
1419
  }
1420
1420
  postdata = postdata2.join('&')
1421
1421
 
1422
- link = GM_LNK_GMAIL + "?view=up"
1422
+ link = GM_LNK_GMAIL + "&view=up"
1423
1423
 
1424
1424
  np = Net::HTTP::Proxy(@proxy_host,@proxy_port,@proxy_user,@proxy_pass).new(GM_LNK_HOST, 80)
1425
1425
  np.set_debug_output($stdout) if DEBUG
@@ -1466,7 +1466,7 @@ module GMailer
1466
1466
  np = Net::HTTP::Proxy(@proxy_host,@proxy_port,@proxy_user,@proxy_pass).new(GM_LNK_HOST, 80)
1467
1467
  np.set_debug_output($stdout) if DEBUG
1468
1468
  np.start { |http|
1469
- response = http.get(GM_LNK_GMAIL + "?" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
1469
+ response = http.get(GM_LNK_GMAIL + "&" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
1470
1470
  }
1471
1471
 
1472
1472
  return true
@@ -1503,12 +1503,12 @@ module GMailer
1503
1503
  np.set_debug_output($stdout) if DEBUG
1504
1504
  if (id.is_a?(Array))
1505
1505
  np.start { |http|
1506
- response = http.post(GM_LNK_GMAIL+"?view=up", query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT} )
1506
+ response = http.post(GM_LNK_GMAIL+"&view=up", query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT} )
1507
1507
  parse_response(response.body)
1508
1508
  }
1509
1509
  else
1510
1510
  np.start { |http|
1511
- response = http.get(GM_LNK_GMAIL + "?" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
1511
+ response = http.get(GM_LNK_GMAIL + "&" + query,{'Cookie' => @cookie_str,'User-agent' => GM_USER_AGENT })
1512
1512
  parse_response(response.body)
1513
1513
  }
1514
1514
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: gmailer
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2007-11-20 00:00:00 +09:00
6
+ version: 0.2.1
7
+ date: 2007-12-22 00:00:00 +09:00
8
8
  summary: An class interface of the Google's webmail service
9
9
  require_paths:
10
10
  - ""