]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/serv_smtp.c
* Removed the 'protocol' parameter from the sock_connect() function. All we have...
[citadel.git] / citadel / modules / smtp / serv_smtp.c
index 6bbe6471889c84e42f71f78d084602f0f8f049da..b6ae6d044f9e0b6f358263aa4dde9046053b7d18 100644 (file)
@@ -992,7 +992,7 @@ void smtp_try(const char *key, const char *addr, int *status,
 
        /* Load the message out of the database */
        CCC->redirect_buffer = NewStrBufPlain(NULL, SIZ);
-       CtdlOutputMsg(msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL, ESC_DOT);
+       CtdlOutputMsg(msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL, (ESC_DOT|SUPPRESS_ENV_TO) );
        msg_size = StrLength(CC->redirect_buffer);
        msgtext = SmashStrBuf(&CC->redirect_buffer);
 
@@ -1002,7 +1002,7 @@ void smtp_try(const char *key, const char *addr, int *status,
                scan_done = 0;
                ptr = msgtext;
                do {
-                       if (ptr = memreadline(ptr, buf, sizeof buf), *ptr == 0) {
+                       if (ptr = cmemreadline(ptr, buf, sizeof buf), *ptr == 0) {
                                scan_done = 1;
                        }
                        if (!strncasecmp(buf, "From:", 5)) {
@@ -1083,7 +1083,7 @@ void smtp_try(const char *key, const char *addr, int *status,
                        strcpy(mx_port, "25");
                }
                CtdlLogPrintf(CTDL_DEBUG, "SMTP client: connecting to %s : %s ...\n", mx_host, mx_port);
-               sock = sock_connect(mx_host, mx_port, "tcp");
+               sock = sock_connect(mx_host, mx_port);
                snprintf(dsn, SIZ, "Could not connect: %s", strerror(errno));
                if (sock >= 0) CtdlLogPrintf(CTDL_DEBUG, "SMTP client: connected!\n");
                if (sock < 0) {
@@ -1743,9 +1743,8 @@ void *smtp_do_queue(void *arg) {
        struct CitContext smtp_queue_CC;
 
        CtdlFillSystemContext(&smtp_queue_CC, "SMTP Send");
-       CtdlLogPrintf(CTDL_INFO, "SMTP client: processing outbound queue\n");
-
        citthread_setspecific(MyConKey, (void *)&smtp_queue_CC );
+       CtdlLogPrintf(CTDL_INFO, "SMTP client: processing outbound queue\n");
 
        if (CtdlGetRoom(&CC->room, SMTP_SPOOLOUT_ROOM) != 0) {
                CtdlLogPrintf(CTDL_ERR, "Cannot find room <%s>\n", SMTP_SPOOLOUT_ROOM);