Ok, nevermind, I got it -- this counts the lines in the string and truncates the string when it reaches the requested limit. Will add a comment to the source.
There's actually a totally different problem here; the problem is that lines == -2 (do not send headers) is not respected. Headers are always sent. On Mon, 2006-10-02 at 09:18 -0700, Aaron Stone wrote: > Even after calling get_crlf_encoded, db_send_message_lines has this very > weird loop, without any comments, before sending out the body: > > /* always send all headers */ > raw = get_crlf_encoded(hdr); > ci_write((FILE *)fstream, "%s", raw); > dm_free(hdr); > dm_free(raw); > > /* send requested body lines */ > raw = get_crlf_encoded(buf); > dm_free(buf); > > --- confused from here > s = g_string_new(raw); > if (lines > 0) { > while (raw[pos] && n < lines) { > if (raw[pos] == '\n') > n++; > pos++; > } > s = g_string_truncate(s,pos); > } > --- to here about this > dm_free(raw); > > Aaron > > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev