- $body = ereg_replace("\n", "\r\n", $body);
- /* In order to remove the problem of users not able to create
- * messages with "." on a blank line, RFC821 has made provision
- * in section 4.5.2 (Transparency).
- */
- $body_smtp = $body;
- if (($body_smtp{0} == '.')) {
- $body_smtp = '.' . $body_smtp;
- }
- $body_smtp = str_replace("\n.","\n..",$body_smtp);
-
-
- $length = sendSMTP($t, $c, $b, $subject, $body_smtp, $more_headers,
+ /* In order to remove the problem of users not able to create
+ * messages with "." on a blank line, RFC821 has made provision
+ * in section 4.5.2 (Transparency).
+ */
+ if (($body && $body{0} == '.')) {
+ $body = '.' . $body;
+ }
+ $body = str_replace("\n.","\n..",$body);
+ $length = sendSMTP($t, $c, $b, $subject, $body, $more_headers,