pike.git / lib / modules / Protocols.pmod / SMTP.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/SMTP.pmod:113:    //! 200-399 an exception will be thrown.    void send_message(string from, array(string) to, string body)    {    cmd("MAIL FROM: <" + from + ">");    foreach(to, string t) {    cmd("RCPT TO: <" + t + ">");    }    cmd("DATA");       // Perform quoting according to RFC 2821 4.5.2. +  // and 2.3.7    if (sizeof(body) && body[0] == '.') {    body = "." + body;    } -  body = replace(body, "\r\n.", "\r\n.."); +  body = replace(body, ({ +  "\r\n.", +  "\r\n", +  "\r", +  "\n", +  }), +  ({ +  "\r\n..", +  "\r\n", +  "\r\n", +  "\r\n", +  }));       // RFC 2821 4.1.1.4:    // An extra <CRLF> MUST NOT be added, as that would cause an empty    // line to be added to the message.    if (has_suffix(body, "\r\n")) {    body += ".";    } else {    body += "\r\n.";    }    cmd(body);