1
| | attachment.open(attach_path.c_str(),ifstream::in|ifstream::binary|ifstream::ate);
if(attachment.good()){
attachment.seekg (0, ifstream::end);
size = attachment.tellg();
if(dbgg==1){
cout << "Attachment size is " << size << endl;
logger << "Attachment size is " << size << endl;
}
attachment.seekg(0,ifstream::beg);
buffer = new char[size];
attachment.read(buffer,size);
attachment.close();
|