nu7hatch / gmail

A Rubyesque interface to Gmail, with all the tools you'll need.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moving emails to trash won't work when the account language is different that english

mensfeld opened this issue · comments

Try switching your account to polish and try to move stuff (delete!) to trash. Won't work. Instead of hardcoding it (message.rb - line 77-78):

trash = @gmail.labels.exist?('[Gmail]/Bin') ? '[Gmail]/Bin' : '[Gmail]/Trash'
move_to(trash) unless %w[[Gmail]/Spam [Gmail]/Bin [Gmail]/Trash].include?(@mailbox.name)

would be nice if you could add a method to manually set trash name (and set Bin/Trash by default).

The work around is quite simple:

mail.delete!
mail.move_to(TRASH_NAME)

Where TRASH_NAME is the localized trash name (for polish it is '[Gmail]/Kosz')

This should be fixed with #83

#83 is now merged hence closing.

This issue was moved to gmailgem/gmail#58