X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/1136f709ef8add5fa9ba8663db910003362e1bd2..0b401fb654b69fd9649954a9bdd5ff041971e62d:/src/mail-sendmail.c?ds=inline diff --git a/src/mail-sendmail.c b/src/mail-sendmail.c index 5da1fc9..4c255ff 100644 --- a/src/mail-sendmail.c +++ b/src/mail-sendmail.c @@ -5,7 +5,7 @@ * * srvx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -123,15 +123,6 @@ mail_send(struct userNode *from, struct handle_info *to, const char *subject, co close(infds[0]); close(outfds[1]); - /* Do we have any "extra" headers to send? */ - extras = conf_get_data("mail/extra_headers", RECDB_STRING_LIST); - if (extras) { - for (nn=0; nnused; nn++) { - fputs(extras->list[nn], out); - fputs("\n", out); - } - } - /* Content type? (format=flowed is a standard for plain text * that lets the receiver reconstruct paragraphs, defined in * RFC 2646. See comment above send_flowed_text() for more.) @@ -145,6 +136,15 @@ mail_send(struct userNode *from, struct handle_info *to, const char *subject, co fprintf(out, "To: \"%s\" <%s>\n", to->handle, to->email_addr); fprintf(out, "Subject: %s\n", subject); + /* Do we have any "extra" headers to send? */ + extras = conf_get_data("mail/extra_headers", RECDB_STRING_LIST); + if (extras) { + for (nn=0; nnused; nn++) { + fputs(extras->list[nn], out); + fputs("\n", out); + } + } + /* Send mail body */ fputs("\n", out); /* terminate headers */ extras = conf_get_data((first_time?"mail/body_prefix_first":"mail/body_prefix"), RECDB_STRING_LIST);