How to retrieve only unread emails with ruby mail gem?

落爺英雄遲暮 提交于 2019-12-23 12:27:33

问题


I am trying to retrieve emails with ruby mail gem, in the examples it says that Mail.last will retrieve the last unread email https://github.com/mikel/mail#getting-emails-from-a-pop-server but it returns just the last email no matter whether it has been read before or not. Does anybody know how to get only unread emails?


回答1:


This question was answered in Need help on reading emails with "mail" gem in ruby

However the answer was not accepted - don´t know why. Also the question did not mention "unread email" nor the [mail-gem] tag so it was not obvious to search.

The answer points to the solution on the ruby-gem issues report https://github.com/mikel/mail/issues/258



来源:https://stackoverflow.com/questions/18150069/how-to-retrieve-only-unread-emails-with-ruby-mail-gem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!