<?php
    function send_email($email, $subject, $body, $type = 'plain')
    {
        @mail($email, $subject, $body, "From: noreply@" . str_replace('www.', '', strtolower($_SERVER['HTTP_HOST'])) . "\r\nX-Mailer: PHP/" . phpversion() . "\r\nErrors-To: errors@" . str_replace('www.', '', strtolower($_SERVER['HTTP_HOST'])) . "\r\nMIME-Version: 1.0\r\nContent-Type: text/" . $type . "; charset=utf-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n");
    }
?>