X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=5ac02ab9a8c17b09764fcebb032fc9bc80586417;hp=6ba421a4a20846f8ebadae4522761f9373486129;hb=8e39affbf1cd8a2a5ff5c9991650d54fdcea4997;hpb=8db3fe9c19320b6f6e508d6b1aae03980239a930 diff --git a/sendlib.c b/sendlib.c index 6ba421a..5ac02ab 100644 --- a/sendlib.c +++ b/sendlib.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -26,10 +27,9 @@ #include "pager.h" #include "charset.h" #include "mutt_idna.h" -#include "send_smtp.h" #ifdef USE_NNTP -#include +#include "nntp.h" #endif #ifdef HAVE_SYSEXITS_H @@ -1807,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; @@ -1820,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 { @@ -1917,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) {