# HG changeset patch # User Adam Chlipala # Date 1454608140 18000 # Node ID 4a0de889bcec13ce1160cef09ef529745b8bc918 # Parent f96ca37be746b36b9126ef1ce87ad15a3aa460d4 Grow buffer; stop including Bcc header diff -r f96ca37be746 -r 4a0de889bcec mail.c --- 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);