When a I sent an email with Netsmtp module, I get:
Uncaught exception: Invalid_argument "index out of bounds"
I have made a change in the 'client#data' source:
while true do
let l = chan # input_line () in
if String.length l > 0 && l.[0] = '.' then oc
# output_char '.';
oc # output_string l;
let pos = if String.length l > 2 then 2 else 1 in
oc # output_string
(if String.length l > 0 &&
l.[String.length l - pos] = '\r' then "\n" else "\r\n")
Now, I can sent emails.
Bug was still there :-(
Fixed differently.