int send_digest(struct mlmmj_list *list, int firstindex, int lastindex,
int issue, const char *addr, const char *mlmmjsend)
{
- int i, fd, archivefd, status, hdrfd;
+ int i, fd, archivefd, status, hdrfd, r;
size_t len;
text * txt;
char buf[100];
myfree(tmp);
}
- tmp = concatstr(10, "From: ", list->name, list->delim, "help@", list->fqdn,
+ r = dprintf(fd, "From: %s%shelp@%s"
"\nMIME-Version: 1.0"
"\nContent-Type: multipart/" DIGESTMIMETYPE "; "
- "boundary=", boundary,
- "\nSubject: ", subject,
- "\n");
-
+ "boundary=%s"
+ "\nSubject: %s\n",
+ list->name, list->delim, list->fqdn, boundary, subject);
myfree(subject);
- if (dprintf(fd, "%s", tmp) < 0) {
- myfree(tmp);
+ if (r < 0)
goto errdighdrs;
- }
- myfree(tmp);
if(hdrfd >= 0 && dumpfd2fd(hdrfd, fd) < 0) {
goto errdighdrs;