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

View file

@ -98,7 +98,10 @@ char* attach_files(char* message, size_t len){
/* Now we can start the real work! */ /* Now we can start the real work! */
/* Announce our presence via header */ /* 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; return email.message;
} }