Fixed message append

Signed-off-by: tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
tyrolyean 2020-04-29 00:42:48 +02:00
parent 8654787f7e
commit 8b0210010d
No known key found for this signature in database
GPG key ID: EDD105663B707C62

View file

@ -17,6 +17,7 @@
#include "mail.h" #include "mail.h"
#include "tools.h" #include "tools.h"
#include "attach.h"
#include <string.h> #include <string.h>
#include <stddef.h> #include <stddef.h>
@ -67,9 +68,10 @@ int append_to_header(struct email_t* mail, const char* pair){
buffer[1] = '\n'; buffer[1] = '\n';
strcat(buffer, pair); 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); mail->header_len);
free(buffer); free(buffer);
redetect_body_head(mail);
return 0; return 0;