D
Damjan Rems
I am trying to save attachment(s) from mail read with net/imap.
Attachment is a tif file.
att = imap.fetch(msgID, "BODY[2]")[0].attr["BODY[2]"].unpack('m')
File.new('att.tif','w+').write(att)
I tried it on linux and it works withouth glitch, but on windows every
LF (x0A) character is replaced with CRLF sequence. Needless to say file
is unreadable.
Is this a bug or am I missing something?
Thank you
TheR
Attachment is a tif file.
att = imap.fetch(msgID, "BODY[2]")[0].attr["BODY[2]"].unpack('m')
File.new('att.tif','w+').write(att)
I tried it on linux and it works withouth glitch, but on windows every
LF (x0A) character is replaced with CRLF sequence. Needless to say file
is unreadable.
Is this a bug or am I missing something?
Thank you
TheR