Download attachments and Base64 coding
I'm making tiny e-mail application downloading attachments from server POP3. I used QByteArray::fromBase64 to decode files. I haven't got problems with *.txt files but I can't download and save e.g. *.png files. Images files are dameged. This is my code:
Code:
for( ... )
{
(...)
hashAtt.append(lines[i]);
(...)
}
{
out << hashAtt;
hashAtt.clear();
}
What should I do to correctly download all attachments from host?
Re: Download attachments and Base64 coding
On the image files that come out corrupted, what does the content-encoding header say?
There's no guarantee that every mail client will use base64. It's the most common, but not the only encoding, hence the reason for the header.