when saving the attachment:
newFile = File.open(File.join(dir, f.filename), "w")
contents = f.body.decoded
newFile << contents
newFile.close
I see added new line character after each line in comperison with attachment.
I tried to change encoding in begging of script or while saving but it didn't help.
The Mail gem does our attachment handling, so if there's an issue it's probably within the Mail gem. I will reopen this issue if you can come back with evidence that Gmail gem is doing something wrong.
when saving the attachment: newFile = File.open(File.join(dir, f.filename), "w") contents = f.body.decoded newFile << contents newFile.close
I see added new line character after each line in comperison with attachment. I tried to change encoding in begging of script or while saving but it didn't help.