diff mail.c @ 7:4a0de889bcec

Grow buffer; stop including Bcc header
author Adam Chlipala <adam@chlipala.net>
date Thu, 04 Feb 2016 12:49:00 -0500
parents f96ca37be746
children fe6049d23ce5
line wrap: on
line diff
--- a/mail.c	Thu Feb 04 09:23:10 2016 -0500
+++ b/mail.c	Thu Feb 04 12:49:00 2016 -0500
@@ -143,7 +143,7 @@
   uw_Basis_string body, xbody;
 } job;
 
-#define BUFLEN 1024
+#define BUFLEN (1024*1024)
 
 static int smtp_read(uw_context ctx, int sock, char *buf, ssize_t *pos) {
   char *s;
@@ -187,6 +187,7 @@
 }
 
 static int really_string(int sock, const char *s) {
+  fprintf(stderr, "MAIL: %s\n", s);
   return uw_really_send(sock, s, strlen(s));
 }
 
@@ -354,17 +355,6 @@
     }
   }
 
-  if (j->h->bcc) {
-    snprintf(out, sizeof(out), "Bcc: %s\r\n", j->h->bcc);
-    out[sizeof(out)-1] = 0;
-
-    if (really_string(sock, out) < 0) {
-      close(sock);
-      uw_set_error_message(j->ctx, "Error sending Bcc");
-      return;
-    }
-  }
-
   if ((s = uw_get_global(j->ctx, "extra_mail_headers"))) {
     if (really_string(sock, s) < 0) {
       close(sock);