From: <vb...@us...> - 2002-09-17 21:51:20
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv14758/core Modified Files: email_api.php Log Message: - Fixed a strange parse error with email_api + renamed make_lf_crlf to comply with the email_* prefix. - Updated the changelog. Index: email_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/email_api.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- email_api.php 17 Sep 2002 06:25:03 -0000 1.2 +++ email_api.php 17 Sep 2002 21:51:17 -0000 1.3 @@ -71,29 +71,29 @@ $t_headers .= $p_header; - $t_recipient = make_lf_crlf( $t_recipient ); - $t_subject = make_lf_crlf( $t_subject ); - $t_message = make_lf_crlf( $t_message ); - $t_headers = make_lf_crlf( $t_headers ); + $t_recipient = email_make_lf_crlf( $t_recipient ); + $t_subject = email_make_lf_crlf( $t_subject ); + $t_message = email_make_lf_crlf( $t_message ); + $t_headers = email_make_lf_crlf( $t_headers ); $result = mail( $t_recipient, $t_subject, $t_message, $t_headers ); if ( false === $result ) { echo "PROBLEMS SENDING MAIL TO: $t_recipient<br />"; - echo htmlspecialchars($t_recipient)."<br />"; - echo htmlspecialchars($t_subject)."<br />"; - echo nl2br(htmlspecialchars($t_headers))."<br />"; - #echo nl2br(htmlspecialchars($t_message))."<br />"; + echo htmlspecialchars($t_recipient).'<br />'; + echo htmlspecialchars($t_subject).'<br />'; + echo nl2br(htmlspecialchars($t_headers)).'<br />'; + #echo nl2br(htmlspecialchars($t_message)).'<br />'; exit; } } # -------------------- # clean up LF to CRLF - function make_lf_crlf( $p_string ) { - if ( ON == config_get( 'mail_send_crlf' ) { - $p_string = str_replace( "\n", "\r\n", $p_string ); - return str_replace( "\r\r\n", "\r\n", $p_string ); - } else { + function email_make_lf_crlf( $p_string ) { + if ( OFF == config_get( 'mail_send_crlf' ) ) { return $p_string; } + + $p_string = str_replace( "\n", "\r\n", $p_string ); + return str_replace( "\r\r\n", "\r\n", $p_string ); } # -------------------- -?> +?> \ No newline at end of file |