manage folders with non-latin1 names
This commit is contained in:
parent
0d20ce14b8
commit
5264cf12ab
|
@ -1,3 +1,4 @@
|
|||
require 'ezcrypto'
|
||||
class FoldersController < ApplicationController
|
||||
include ImapUtils
|
||||
|
||||
|
|
|
@ -156,16 +156,16 @@ class IMAPMailbox
|
|||
end
|
||||
|
||||
def create_folder(name)
|
||||
begin
|
||||
@imap.create(name)
|
||||
# begin
|
||||
@imap.create(Net::IMAP.encode_utf7(name))
|
||||
reload
|
||||
rescue Exception=>e
|
||||
end
|
||||
# rescue Exception=>e
|
||||
# end
|
||||
end
|
||||
|
||||
def delete_folder(name)
|
||||
begin
|
||||
@imap.delete(name)
|
||||
@imap.delete(folders[name].utf7_name)
|
||||
reload
|
||||
rescue Exception=>e
|
||||
logger.error("Exception on delete #{name} folder #{e}")
|
||||
|
|
Loading…
Reference in a new issue