diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-12-24 19:18:02 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-12-24 19:18:02 +0000 |
commit | c844c9b1341d92c81f71d5e3bd1aae5c9faa3c89 (patch) | |
tree | 84d6abb638f73f4aa8f724fcd86cc084a5606c8c /smtp.c | |
parent | 284bf515ccc81c2a8102973396516016cb403f2f (diff) | |
download | fetchmail-c844c9b1341d92c81f71d5e3bd1aae5c9faa3c89.tar.gz fetchmail-c844c9b1341d92c81f71d5e3bd1aae5c9faa3c89.tar.bz2 fetchmail-c844c9b1341d92c81f71d5e3bd1aae5c9faa3c89.zip |
Drop back to using SockGets/SockWrite.
svn path=/trunk/; revision=683
Diffstat (limited to 'smtp.c')
-rw-r--r-- | smtp.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -14,6 +14,7 @@ #include <unistd.h> #include <string.h> #include "fetchmail.h" +#include "socket.h" #include "smtp.h" int smtp_response; /* numeric value of SMTP response code */ @@ -23,7 +24,7 @@ int SMTP_helo(FILE *sockfp,char *host) { int ok; - fprintf(sockfp,"HELO %s\r\n", host); + SockPrintf(sockfp,"HELO %s\r\n", host); if (outlevel == O_VERBOSE) error(0, 0, "SMTP> HELO %s", host); ok = SMTP_ok(sockfp); @@ -35,7 +36,7 @@ int SMTP_from(FILE *sockfp, char *from) { int ok; - fprintf(sockfp,"MAIL FROM:<%s>\r\n", from); + SockPrintf(sockfp,"MAIL FROM:<%s>\r\n", from); if (outlevel == O_VERBOSE) error(0, 0, "SMTP> MAIL FROM:<%s>", from); ok = SMTP_ok(sockfp); @@ -47,7 +48,7 @@ int SMTP_rcpt(FILE *sockfp, char *to) { int ok; - fprintf(sockfp,"RCPT TO:<%s>\r\n", to); + SockPrintf(sockfp,"RCPT TO:<%s>\r\n", to); if (outlevel == O_VERBOSE) error(0, 0, "SMTP> RCPT TO:<%s>", to); ok = SMTP_ok(sockfp); @@ -59,7 +60,7 @@ int SMTP_data(FILE *sockfp) { int ok; - fprintf(sockfp,"DATA\r\n"); + SockPrintf(sockfp,"DATA\r\n"); if (outlevel == O_VERBOSE) error(0, 0, "SMTP> DATA"); ok = SMTP_ok(sockfp); @@ -71,7 +72,7 @@ int SMTP_quit(FILE *sockfp) { int ok; - fprintf(sockfp,"QUIT\r\n"); + SockPrintf(sockfp,"QUIT\r\n"); if (outlevel == O_VERBOSE) error(0, 0, "SMTP> QUIT"); ok = SMTP_ok(sockfp); @@ -83,7 +84,7 @@ int SMTP_eom(FILE *sockfp) { int ok; - fprintf(sockfp,".\r\n"); + SockPrintf(sockfp,".\r\n"); if (outlevel == O_VERBOSE) error(0, 0, "SMTP>. (EOM)"); ok = SMTP_ok(sockfp); @@ -95,7 +96,7 @@ int SMTP_ok(FILE *sockfp) { char buf[SMTPBUFSIZE], *ip; - while ((ip = fgets(buf, sizeof(buf)-1, sockfp))) + while ((ip = SockGets(buf, sizeof(buf)-1, sockfp))) { int n = strlen(ip); |