Location: PHPKode > scripts > WH Social > wh_social/framework/functions/sendmail.php
<?php

    	$goto = "index.php";
    	$autoforward = 5;

    	$datenow = date('d.m.Y H:i');
    	$senderip = $_SERVER['REMOTE_ADDR'];

    	$name = isset($_POST["name"]) ? htmlentities($_POST["name"]) : "";
    	$from = isset($_POST["from"]) ? htmlentities($_POST["from"]) : "";
    	$homepage = isset($_POST["homepage"]) ? htmlentities($_POST["homepage"]) : "http://";
    	$reason = isset($_POST["reason"]) ? htmlentities($_POST["reason"]) : "";
    	$text = isset($_POST["text"]) ? htmlentities($_POST["text"]) : "";

    	$mailto = $to;
    	$mailfrom = $from;
    	$subject = $reason;
    	$message = '' . $lang['sent_on'] . ': ' . $datenow . ' | IP: ' . $senderip . '
----------------------------------------------------------------------

' . $lang['name'] . ': ' . $name . '
' . $lang['e_mail_adress'] . ': ' . $mailfrom . '
' . $lang['homepage'] . ': ' . $homepage . '

' . $lang['subject'] . ': ' . $subject . '

' . $lang['message'] . ': ' . $text . '
';

    $headers = 'From:' . $mailfrom . '';

	if(mail("$mailto", "$subject", "$message", "$headers")) {

    echo '<p class="success">' . $lang['request_sent_successfully'] . '!</p>
	<meta http-equiv="refresh" content="' . $autoforward . '; URL=' . $goto . '">
	<p><em>(' . $lang['redirected_in'] . ' ' . $autoforward . ' ' . $lang['seconds'] . '...)</em><p>';

        }else{
    
        echo '<p class="false">' . $lang['request_not_sent'] . '</p>';
        }

?>
Return current item: WH Social