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
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@
#include "mail.h"
#include "tools.h"
#include "attach.h"
#include <string.h>
#include <stddef.h>
@ -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;