Plain Text Attachments are delivered as inline through sendmail in Solaris

We are trying to send a plain text attachment through sendmail, but it is delivered as a inline message with all the headers in the body of the mail.

I am using the following format for the mail header

dataFile << "\nContent-Type: MULTIPART/mixed; ";

dataFile << "BOUNDARY=Shrewdness_of_Apes_263_000"<<endl;

dataFile ><< "--Shrewdness_of_Apes_263_000"<<endl;

dataFile ><< "Content-Type: TEXT/plain; charset=us-ascii"<<endl;

dataFile ><< "Content-MD5: y0krffm1wXDXyHUnlA7/Ow=="<<endl;

dataFile ><< "--Shrewdness_of_Apes_263_000"<<endl;

dataFile ><< " Content-Type: TEXT/plain;";

dataFile << " name=\"Report.txt\";charset = us-ascii" << endl;

dataFile << " Content-Description:Report.txt"<<endl;

dataFile ><< "Content-MD5: PzHeltJOzVrvtnvTQ9aofQ=="<<endl;

dataFile ><< "\n--Shrewdness_of_Apes_263_000--"<<endl;

Please tell whether the format is correct for Solaris 10.

This is correctly working in Solaris 8.>

[1145 byte] By [proudleoa] at [2007-11-15]