<?
function sentMail( $from, $to, $subject, $body ) {
$fd = popen("/usr/sbin/sendmail -t","w");
fputs($fd, "To: $to\n");
fputs($fd, "From: $from\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP\n");
fputs($fd, "Body: $body\n");
pclose($fd);
}
$aTmp = $message;
$aTmp .= $recieverName;
$aTmp .= $sender;
$sMd5 = md5(serialize($aTmp));
$now = mktime (date("H"),date("i"),date("s"), date("m") ,date("d"),date("Y"));
$Daytoday=date("Y-m-d H:i:s", $now);
$message = "\n\n";
$message .= "Hello $recieverName\n\n";
$message .= "You recieved an e-card from $sender";
$message .= "\n\n";
$message .= "<a href='http://www.jmrhapsody.za.net/index.php?getEcard.php?id=$sMd5''>Click here to read it</a>\n\n";
$message .= "\n";
$message .= "Thank you for using Rhapsody e-cards\nwww.jmrhapsody.za.net";
sentMail( "RHAPSODY E-CARDS", "moosthuizen@mweb.com", "YOU RECIEVED AN E-CARD FROM $sender", $message );
?>
|