(void) fprintf(qout,"To: <%s>\n",tra->mailfrom);
(void) fprintf(qout,"Date: %s\n",rou_ascsysstamp(time((time_t *)0)));
(void) fprintf(qout,"Subject: %s\n",*(tra->resp)+4);
- (void) fprintf(qout,"\n");
- (void) fprintf(qout,"Bigre\n");
- (void) fprintf(qout,"Bigre\n");
break;
case 2 : //attaching email itself
done=eml_attache(qout,tra->sessid);
/* acceptable. */
/* */
/********************************************************/
-PUBLIC int eml_attache(FILE *fout,char *toaddfile)
+PUBLIC int eml_attache(FILE *qout,char *toaddfile)
{
+#define OPEP "unieml.c:eml_attache,"
+#define CNT "Content-"
+
+
int success;
+char *marker;
success=true;
+marker="ABC123";
+//starting part
+(void) fprintf(qout,"MIME-Version: 1.0\n");
+(void) fprintf(qout,"%sType: multipart/mixed; boundary=\"%s\"\n",CNT,marker);
+(void) fprintf(qout,"\nThis is a multi-part message in MIME format.\n\n");
+(void) fprintf(qout,"--%s\n",marker);
+(void) fprintf(qout,"%sType: text/plain; charset=\"iso-8859-1\"\n",CNT);
+(void) fprintf(qout,"%sTransfer-Encoding: 8bit\n\n",CNT);
+
+//explain part
+(void) fprintf(qout,"No comment\n");
+
+//Middle part
+(void) fprintf(qout,"--%s%s",marker,CRLF);
+(void) fprintf(qout,"%sType: message/rfc822;\n\tname=\"%s\"\n",CNT,"ABC");
+(void) fprintf(qout,"%sTransfer-Encoding: 8bit\n",CNT);
+(void) fprintf(qout,"%sDisposition: attachment;\n\tfilename=\"%s\"\n\n",CNT,"ABC");
+
+//corps part
+(void) fprintf(qout,"This is the corps\n");
+
+//end part
+(void) fprintf(qout,"\n--%s--\n\n",marker);
return success;
+
+#undef CNT
+#undef OPEP
}
extern RCPTYP *eml_isemailok(char *email,char **report);
//procedure to create an attachement for email data part.
-extern int eml_attache(FILE *fout,char *toaddfile);
+extern int eml_attache(FILE *qout,char *toaddfile);
#endif