Imap文件夹只返回一个电子邮件子集

时间:2022-09-15 09:27:11

The following script only return 1000 messages within from the sent folder when the actual number of sent messages is in the 3000+

当实际发送的消息数在3000+时,以下脚本只从发送文件夹返回1000条消息

How can I get the rest of the messages?

我怎样才能得到其余的信息呢?

username = ask("Enter your username:  ") { |q| q.echo = true }
password = ask("Enter your password:  ") { |q| q.echo = "*" }
look_in_folder = "[Gmail]/Sent Mail"
save_to_folder = "/Users/penang/Desktop"

puts 'Starting...'
imap = Net::IMAP.new('imap.gmail.com', '993', true)

puts "Logging in as #{username} ..."

imap.login(username, password)

imap.examine(look_in_folder)

mails = imap.uid_search(["FROM", "me"])
puts "Found #{mails.count} mail(s) in folder '#{look_in_folder}'"

2 个解决方案

#1


5  

There is a solution

有一个解决方案

Go to Settings > Labs within Gmail and Enable Advanced IMAP Controls Imap文件夹只返回一个电子邮件子集

进入设置Gmail中的>实验室并启用高级IMAP控件

You should now be able to change the folder size limits in Settings > Forwarding and POP/IMAP

现在应该可以在设置>转发和POP/IMAP中更改文件夹大小限制

Advanced IMAP Controls Enabled: Imap文件夹只返回一个电子邮件子集

启用高级IMAP的控制:

Advanced IMAP Controls Disabled (default): Imap文件夹只返回一个电子邮件子集

高级IMAP控件禁用(默认):

#2


3  

The answer is that there is not anything you can do, it has nothing to do with your script or Net::IMAP. Google is not giving you more than 1000 mails for any folder via IMAP, and there are numerous complaints about this online (IE http://www.google.com/support/forum/p/gmail/thread?tid=2636f734144eeb28&hl=en)

答案是,您无法做任何事情,它与您的脚本或Net: IMAP无关。谷歌没有通过IMAP向您提供超过1000封邮件,并且有很多关于这方面的抱怨(http://www.google.com/support/forum/p/gmail/thread?tid= 2636f734144eeb28&hlen)

#1


5  

There is a solution

有一个解决方案

Go to Settings > Labs within Gmail and Enable Advanced IMAP Controls Imap文件夹只返回一个电子邮件子集

进入设置Gmail中的>实验室并启用高级IMAP控件

You should now be able to change the folder size limits in Settings > Forwarding and POP/IMAP

现在应该可以在设置>转发和POP/IMAP中更改文件夹大小限制

Advanced IMAP Controls Enabled: Imap文件夹只返回一个电子邮件子集

启用高级IMAP的控制:

Advanced IMAP Controls Disabled (default): Imap文件夹只返回一个电子邮件子集

高级IMAP控件禁用(默认):

#2


3  

The answer is that there is not anything you can do, it has nothing to do with your script or Net::IMAP. Google is not giving you more than 1000 mails for any folder via IMAP, and there are numerous complaints about this online (IE http://www.google.com/support/forum/p/gmail/thread?tid=2636f734144eeb28&hl=en)

答案是,您无法做任何事情,它与您的脚本或Net: IMAP无关。谷歌没有通过IMAP向您提供超过1000封邮件,并且有很多关于这方面的抱怨(http://www.google.com/support/forum/p/gmail/thread?tid= 2636f734144eeb28&hlen)