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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/SMTP.pmod:156:    //! Some important headers are set to:    //! @expr{"Content-Type: text/plain; charset=iso-8859-1"@} and    //! @expr{"Content-Transfer-Encoding: 8bit"@}. @expr{"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) +  if (!has_value(msg, "\r\n"))    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,    "from":from,    "to":to,    "content-type":    "text/plain;charset=iso-8859-1",    "content-transfer-encoding":    "8bit"])));