我使用gem Mail。我的代码:
async
如何在循环中标记仅删除一封邮件?像这样await
。我想,如果处理字母错误,请将其删除,否则请离开。
该文档仅包含一种删除所有邮件的方法Mail.defaults do
retriever_method :pop3, :address => CONFIG_FILE["mail_params"]["address"],
:port => CONFIG_FILE["mail_params"]["port"],
:user_name => CONFIG_FILE["mail_params"]["user_name"],
:password => CONFIG_FILE["mail_params"]["password"],
:enable_ssl => CONFIG_FILE["mail_params"]["enable_ssl"]
end
emails = Mail.all(:order => :asc)
emails.each do |mail|
#do something
end