X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_libesmtp.c;h=d9124771ea4c0ecca4e462cf07572b5502881a5d;hp=552484481639703268b0f78d0e6257e152480a0f;hb=2c56b665394c80195b976537e608b690947fcb14;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/mutt_libesmtp.c b/mutt_libesmtp.c index 5524844..d912477 100644 --- a/mutt_libesmtp.c +++ b/mutt_libesmtp.c @@ -15,14 +15,14 @@ #endif #include +#include +#include +#include + +#include #include "mutt.h" -#include "ascii.h" -#include "enter.h" -#include "lib/mem.h" -#include "lib/intl.h" -#include "lib/str.h" #if defined (USE_SSL) || (defined (USE_GNUTLS) && defined (HAVE_GNUTLS_OPENSSL_H)) #include @@ -96,7 +96,7 @@ static void _mutt_libesmtp_perror (const char *msg) * Very similar to sendlib.c::add_args */ static int -_mutt_libesmtp_add_recipients (smtp_message_t message, ADDRESS * addr) +_mutt_libesmtp_add_recipients (smtp_message_t message, address_t * addr) { int ret = 0; @@ -289,8 +289,8 @@ int mutt_libesmtp_check_usetls (const char* option, unsigned long p, char* val = (char*) p; if (!val || !*val) return (1); - if (str_ncmp (val, "enabled", 7) != 0 && - str_ncmp (val, "required", 8) != 0) { + if (m_strncmp(val, "enabled", 7) != 0 && + m_strncmp(val, "required", 8) != 0) { if (errbuf) snprintf (errbuf, errlen, _("'%s' is invalid for %s"), val, option); return (0); @@ -305,8 +305,8 @@ int mutt_libesmtp_check_usetls (const char* option, unsigned long p, * Returns 0 upon success, -1 upon failure (and prints an error * message). */ -int mutt_libesmtp_invoke (ADDRESS * from, /* the sender */ - ADDRESS * to, ADDRESS * cc, ADDRESS * bcc, /* recips */ +int mutt_libesmtp_invoke (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 */ @@ -335,7 +335,7 @@ int mutt_libesmtp_invoke (ADDRESS * from, /* the sender */ /* Create hostname:port string and tell libesmtp */ /* len = SmtpHost len + colon + max port (65536 => 5 chars) + terminator */ - hostportlen = str_len (SmtpHost) + 7; + hostportlen = m_strlen(SmtpHost) + 7; hostportstr = p_new(char, hostportlen); snprintf (hostportstr, hostportlen, "%s:%d", SmtpHost, SmtpPort); if (!smtp_set_server (session, hostportstr))