SMTP Async I/O:
[citadel.git] / citadel / modules / smtp / serv_smtp.c
index b0572f5a1f7b96f347a4328169d56941e0447970..fc43a9624529001f924df11e379d9ef126e565d4 100644 (file)
@@ -1272,7 +1272,10 @@ void smtp_try(const char *key, const char *addr, int *status,
        }
 
        /* If we reach this point, the server is expecting data.*/
-       sock_write(&sock, msgtext, msg_size);
+       sock_write_timeout(&sock, 
+                          msgtext, 
+                          msg_size, 
+                          (msg_size / 128) + 50);
        if (msgtext[msg_size-1] != 10) {
                CtdlLogPrintf(CTDL_WARNING, "Possible problem: message did not "
                        "correctly terminate. (expecting 0x10, got 0x%02x)\n",