Added error handling for header attach

Signed-off-by: tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
tyrolyean 2020-04-29 00:36:14 +02:00
parent fdc2ddf53b
commit 8654787f7e
No known key found for this signature in database
GPG Key ID: EDD105663B707C62
1 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,10 @@ char* attach_files(char* message, size_t len){
/* Now we can start the real work! */
/* Announce our presence via header */
append_header(&email,"X-Mailattached", instance_id);
if(append_header(&email,"X-Mailattached", instance_id) < 0){
fprintf(stderr, "Failed to attach header!\n");
return email.message;
}
return email.message;
}