From 9fb6c6ef6c334d786466209d94f6df4bcdec9a51 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Fri, 13 Jun 2025 16:53:59 -0400 Subject: [PATCH] Attachement is fully working --- lib/geseml.c | 2 +- lib/unieml.c | 11 ++++++++++- lib/unieml.h | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/geseml.c b/lib/geseml.c index cd4b3b9..0a72ace 100644 --- a/lib/geseml.c +++ b/lib/geseml.c @@ -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?)", diff --git a/lib/unieml.c b/lib/unieml.c index 4bad24e..cfdbb26 100644 --- a/lib/unieml.c +++ b/lib/unieml.c @@ -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); diff --git a/lib/unieml.h b/lib/unieml.h index 8259b11..d391976 100644 --- a/lib/unieml.h +++ b/lib/unieml.h @@ -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 -- 2.47.3