([^<]*))?(.*)$|ism', $content, $matches); $subject = $matches[2]; $body = $matches[3]; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: " . param('site email name') . " <" . param('site email address') . ">\r\n"; $t = microtime(); $t = explode(' ', $t); $t = str_replace('.', '', $t[0]); $filename = 'mails/mail-' . date('Y-m-d-H-i-s-') . $t . '.html'; $handle = @fopen($filename, 'w'); if ($handle !== false) { ob_start(); echo "