Skip to content

fetch only today emails #6452

Discussion options

You must be logged in to vote

can be done with using "keys:"

Mail.find(what: :last, count: 10, order: :asc , keys: ['SINCE', today]).each do |inbound_mail|
def today
(Time.zone.today).strftime('%d-%b-%Y')
end

https://www.rfc-editor.org/rfc/rfc2060#section-6.4.4

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Double-Click-ERP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant