]> jfr.im git - irc/evilnet/x3.git/commitdiff
Moved the extra_headers SMTP headers to after the standard SMTP headers
authorMatthew Beeching <redacted>
Thu, 26 Jun 2014 18:53:54 +0000 (19:53 +0100)
committerMatthew Beeching <redacted>
Thu, 26 Jun 2014 18:53:54 +0000 (19:53 +0100)
src/mail-sendmail.c

index 7c23531def38749289c1708b0cd091d981cfea1a..4c255ff9f22fd1f308f8ee7c6a860f7fa54844c2 100644 (file)
@@ -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; nn<extras->used; 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; nn<extras->used; 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);