BugReporter::setEmail PHP Method

setEmail() public method

Set the error reporter's email address.
public setEmail ( $p_email ) : void
return void
    public function setEmail($p_email)
    {
        $this->m_email = $p_email;
    }

Usage Example

Example #1
0
$f_description = Input::Get("f_description", "string", "", true);
$f_body = Input::Get("f_body", "string", "");

// --- If this information is a POST from errormessage.php, send it to
//     the server ---
if ($f_isFromInterface && ($_SERVER['REQUEST_METHOD'] == "POST") ) {

    $wasSent = false;

   	// Remove the code name from the version number.
    $version = explode(" ", $Campsite['VERSION']);
    $version = array_shift($version);

    $reporter = new BugReporter(0, "",  mktime(), "", "Campsite", $version);
    $reporter->setBacktraceString($f_body);
    $reporter->setServer($server);
    $reporter->setDescription($f_description);
    $reporter->setEmail($f_email);
    $wasSent = $reporter->sendToServer();


    // --- Verify send was successful, and say thank you or sorry
    //     accordingly ---
    if ($wasSent == true) {
        include($Campsite['HTML_DIR'] . "/$ADMIN_DIR/feedback/thankyou.php");
    } else {
    	include($Campsite['HTML_DIR'] . "/$ADMIN_DIR/feedback/emailus.php");
    }
}

?>