From 8b0210010da22ce3b67bba787831086240f3f2d1 Mon Sep 17 00:00:00 2001 From: tyrolyean Date: Wed, 29 Apr 2020 00:42:48 +0200 Subject: [PATCH] Fixed message append Signed-off-by: tyrolyean --- src/mail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mail.c b/src/mail.c index 463d499..e34cd01 100644 --- a/src/mail.c +++ b/src/mail.c @@ -17,6 +17,7 @@ #include "mail.h" #include "tools.h" +#include "attach.h" #include #include @@ -67,9 +68,10 @@ int append_to_header(struct email_t* mail, const char* pair){ buffer[1] = '\n'; strcat(buffer, pair); - mail->message=insert_string(mail->message, buffer, strlen(buffer), + mail->message=insert_string(mail->message, buffer, mail->message_length, mail->header_len); free(buffer); + redetect_body_head(mail); return 0;