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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/SMTP.pmod:145:    tokens = tokens[search(tokens, '<') + 1..];       if ((i = search(tokens, '>')) != -1) {    tokens = tokens[..i-1];    }    return tokens*"";    }       //! Sends an e-mail. Wrapper function that uses @[send_message].    //! +  //! @note +  //! Some important headers are set to: +  //! @tt{"Content-Type: text/plain; charset=iso-8859-1"@} and +  //! @tt{"Content-Transfer-Encoding: 8bit"@}. @tt{"Date:"@} header +  //! isn't used at all. +  //!    //! @throws    //! If the mail server returns any other return code than    //! 200-399 an exception will be thrown.    void simple_mail(string to, string subject, string from, string msg)    {    if (search(msg,"\r\n")==-1)    msg=replace(msg,"\n","\r\n"); // *simple* mail /Mirar    send_message(parse_addr(from), ({ parse_addr(to) }),    (string)MIME.Message(msg, (["mime-version":"1.0",    "subject":subject,