]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Attachement is fully working
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 13 Jun 2025 20:53:59 +0000 (16:53 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 13 Jun 2025 20:53:59 +0000 (16:53 -0400)
lib/geseml.c
lib/unieml.c
lib/unieml.h

index cd4b3b9616e2093d29a0407aab542bb8429881ff..0a72ace15e55a5700f86a1fdc8657c68ada7df73 100644 (file)
@@ -799,7 +799,7 @@ while (proceed==true) {
       (void) fprintf(qout,"Subject: %s\n",*(tra->resp)+4);
       break;
     case 2      :       //attaching (200 line at most) from email itself
-      done=eml_attache(qout,tra->sessid,200);
+      done=eml_attache(qout,tra->sessid,tra->resp,200);
       qout=eml_closeqfile(qout);
       if (done==false) {
         (void) rou_alert(0,"%s Unable to create attachement session (system?)",
index 4bad24ef4caac2d539e0a76a2407d47398b4a48f..cfdbb26f9635651fe10a19a86593ee285c957e3f 100644 (file)
@@ -821,7 +821,7 @@ return info;
 /*      acceptable.                                     */
 /*                                                      */
 /********************************************************/
-PUBLIC int eml_attache(FILE *qout,char *toaddfile,int nbrlines)
+PUBLIC int eml_attache(FILE *qout,char *toaddfile,char **explain,int nbrlines)
 
 {
 #define OPEP    "unieml.c:eml_attache,"
@@ -861,6 +861,15 @@ while (proceed==true) {
       break;
     case 2      :       //mime starting part
       (void) fprintf(qout,"Sending Email was not successful\n");
+      (void) fprintf(qout,"here is the status returned by remote serveur\n");
+      (void) fprintf(qout,"--->\n");
+      if (explain!=(char **)0) {
+        while (*explain!=(char *)0) {
+          (void) fprintf(qout,"\t%s\n",*explain);
+          explain++;
+          }
+        }
+      (void) fprintf(qout,"---<\n");
       break;
     case 3      :       //mime starting part
       (void) fprintf(qout,"--%s%s",marker,CRLF);
index 8259b11f3acbdab7a99f87c9291251912eeb0597..d391976ab8b561b6b95d6b23740aef4507be1d95 100644 (file)
@@ -113,6 +113,6 @@ extern int eml_countqfile(char *qfilename,int count);
 extern RCPTYP *eml_isemailok(char *email,char **report);
 
 //procedure to create an attachement for email data part.
-extern int eml_attache(FILE *qout,char *toaddfile,int nbrlines);
+extern int eml_attache(FILE *qout,char *toaddfile,char **explain,int nbrlines);
 
 #endif