Getting rid of useless settings.
[apps/madmutt.git] / sendlib.c
index 49d4140..5ac02ab 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -15,6 +15,7 @@
 #include <lib-sys/exit.h>
 #include <lib-sys/mutt_signal.h>
 #include <lib-mime/mime.h>
+#include <lib-ui/enter.h>
 #include <lib-ui/curses.h>
 #include <lib-mx/mx.h>
 
 #include "pager.h"
 #include "charset.h"
 #include "mutt_idna.h"
-#include "send_smtp.h"
 
 #ifdef USE_NNTP
-#include <nntp/nntp.h>
+#include "nntp.h"
 #endif
 
 #ifdef HAVE_SYSEXITS_H
@@ -1416,12 +1416,6 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach,
     fprintf (fp, "Followup-To: %s\n", env->followup_to);
   else if (mode == 1 && option (OPTNEWSSEND) && edit_header(mode, "Followup-To:"))
     fputs ("Followup-To:\n", fp);
-
-  if (env->x_comment_to)
-    fprintf (fp, "X-Comment-To: %s\n", env->x_comment_to);
-  else if (mode == 1 && option (OPTNEWSSEND) && option (OPTXCOMMENTTO) &&
-           edit_header(mode, "X-Comment-To:"))
-    fputs ("X-Comment-To:\n", fp);
 #endif
 
   if (env->subject)
@@ -1813,11 +1807,9 @@ add_option(const char **args, ssize_t *argslen, ssize_t *argsmax, const char *s)
     return (args);
 }
 
-static int mutt_invoke_sendmail (address_t * from,        /* the sender */
-                                 address_t * to, address_t * cc, address_t * bcc,     /* recips */
-                                 const char *msg,       /* file containing message */
-                                 int eightbit)
-{                               /* message contains 8bit chars */
+int mutt_invoke_mta(address_t *from, address_t *to, address_t *cc,
+                    address_t *bcc, const char *msg, int eightbit)
+{
   char cmd[LONG_STRING];
   char *ps = NULL, *path = NULL, *childout = NULL;
   const char **args = NULL;
@@ -1826,12 +1818,9 @@ static int mutt_invoke_sendmail (address_t * from,        /* the sender */
 
 #ifdef USE_NNTP
   if (option (OPTNEWSSEND)) {
-    m_strformat(cmd, sizeof(cmd), 0, Inews, nntp_format_str, 0, 0);
-    if (m_strisempty(cmd)) {
-      i = nntp_post (msg);
-      unlink (msg);
-      return i;
-    }
+    i = nntp_post(msg);
+    unlink(msg);
+    return i;
   } else
 #endif
   {
@@ -1923,22 +1912,6 @@ static int mutt_invoke_sendmail (address_t * from,        /* the sender */
   return (i);
 }
 
-int mutt_invoke_mta (address_t * from,    /* the sender */
-                     address_t * to, address_t * cc, address_t * bcc, /* recips */
-                     const char *msg,   /* file containing message */
-                     int eightbit)
-{                               /* message contains 8bit chars */
-#ifdef USE_LIBESMTP
-#ifdef USE_NNTP
-  if (!option (OPTNEWSSEND))
-#endif
-    if (SmtpHost)
-      return send_smtp_invoke (from, to, cc, bcc, msg, eightbit);
-#endif
-
-  return mutt_invoke_sendmail (from, to, cc, bcc, msg, eightbit);
-}
-
 /* For postponing (!final) do the necessary encodings only */
 void mutt_prepare_envelope (ENVELOPE * env, int final)
 {