I encount the problem with my program, which sends an email with an attachement:
My program loads the beginning (before the attached file) and the end (after...) of the message, and generates base64 file. It sends the output via SMTP protocol, and saves generated data. We have:
send(skMain, cBuffer, (int)strlen(cBuffer), 0);
fwrite(cBuffer, (int)strlen(cBuffer), 1, file);
When I open the file, saved with fwrite, with Outlook Express, all is ok, and the attachement is perfect. But when I receive the mail, only a part of my attachement is there.
The size of this received attachement is always the same: 2,303 bytes. Why?