/dev/null 2>&1 &"); // WARNING : popen commented code probably brought some trouble, we will use the pipe method as we were before /*if (!$handle = popen($sys_sendmail_path." -f'$from' -t -i", "w")) { echo "
Error: cannot run '$sys_sendmail_path' - mail not sent
\n"; } else { fwrite($handle, util_prep_string_for_sendmail($body2)); pclose($handle); }*/ } /** * util_encode_mailaddr() - Encode email address to MIME format * * @param string The email address * @param string The email's owner name * @param string The converting charset * */ function util_encode_mailaddr($email,$name,$charset) { if (function_exists('mb_convert_encoding') && trim($name) != "") { $name = "=?".$charset."?B?". base64_encode(mb_convert_encoding( $name,$charset,"UTF-8")). "?="; } return $name." <".$email."> "; } /** * util_encode_mimeheader() - Encode mimeheader * * @param string The email subject * @param string The converting charset (like ISO-2022-JP) * @return string The MIME encoded subject * */ function util_encode_mimeheader($str,$charset) { if (!function_exists('mb_convert_encoding')) { return $str; } return "=?".$charset."?B?". base64_encode(mb_convert_encoding( $str,$charset,"UTF-8")). "?="; } /** * util_convert_body() - Convert body of the email message * * @param string The body of the email message * @param string The charset of the email message * @return string The converted body of the email message * */ function util_convert_body($str,$charset) { if (!function_exists('mb_convert_encoding') || $charset == 'UTF-8') { return $str; } return mb_convert_encoding($str,$charset,"UTF-8"); } function util_send_jabber($to,$subject,$body) { if (!$GLOBALS['sys_use_jabber']) { return; } $JABBER = new Jabber(); if (!$JABBER->Connect()) { echo ''.$i.' | '; } echo '
'.$link . db_result($result, $j, $i) . $linkend.' | '; } } echo '