Home | History | Annotate | Download | only in mail

Lines Matching refs:hp

339 fixhead(struct header *hp, struct name *tolist)
343 hp->h_to = NULL;
344 hp->h_cc = NULL;
345 hp->h_bcc = NULL;
350 hp->h_to =
351 cat(hp->h_to, nalloc(np->n_name, np->n_type));
353 hp->h_cc =
354 cat(hp->h_cc, nalloc(np->n_name, np->n_type));
356 hp->h_bcc =
357 cat(hp->h_bcc, nalloc(np->n_name, np->n_type));
442 puthead(struct header *hp, FILE *fo, int w)
448 if (hp->h_to != NULL && w & GTO)
449 fmt("To:", hp->h_to, fo, w & GCOMMA), gotcha++;
450 if (hp->h_subject != NULL && w & GSUBJECT)
451 (void)fprintf(fo, "Subject: %s\n", hp->h_subject), gotcha++;
452 if (hp->h_cc != NULL && w & GCC)
453 fmt("Cc:", hp->h_cc, fo, w & GCOMMA), gotcha++;
454 if (hp->h_bcc != NULL && w & GBCC)
455 fmt("Bcc:", hp->h_bcc, fo, w & GCOMMA), gotcha++;
456 if (hp->h_in_reply_to != NULL && w & GMISC)
457 (void)fprintf(fo, "In-Reply-To: %s\n", hp->h_in_reply_to), gotcha++;
458 if (hp->h_references != NULL && w & GMISC)
459 fmt("References:", hp->h_references, fo, w & GCOMMA), gotcha++;
460 if (hp->h_extra != NULL && w & GMISC) {
461 for (np = hp->h_extra; np != NULL; np = np->n_flink)
465 if (hp->h_smopts != NULL && w & GSMOPTS)
466 (void)fprintf(fo, "(sendmail options: %s)\n", detract(hp->h_smopts, GSMOPTS)), gotcha++;
468 if (w & GMIME && (hp->h_attach || value(ENAME_MIME_ENCODE_MSG)))
469 mime_putheader(fo, hp), gotcha++;
481 infix(struct header *hp, FILE *fi)
503 (void)puthead(hp, nfo,
680 mail1(struct header *hp, int printheaders)
690 if ((mtf = collect(hp, printheaders)) == NULL)
697 hp->h_extra = ncopy(extra_headers);
702 (void)grabh(hp, GCC);
704 (void)grabh(hp, GBCC);
713 if (hp->h_subject == NULL)
724 to = usermap(cat(hp->h_bcc, cat(hp->h_to, hp->h_cc)));
734 if (hp->h_attach || value(ENAME_MIME_ENCODE_MSG))
735 mtf = mime_encode(mtf, hp);
741 to = outof(to, mtf, hp);
747 fixhead(hp, to);
748 if ((mtf = infix(hp, mtf)) == NULL) {
752 if (hp->h_smopts == NULL) {
753 hp->h_smopts = get_smopts(to);
754 if (hp->h_smopts != NULL &&
755 hp->h_smopts->n_name[0] != '\0' &&
757 if (grabh(hp, GSMOPTS)) {
763 namelist = unpack(hp->h_smopts, to);