Very useful a complete email sending program, very simple, copy the following code to a blank text page, such as index.php, run on the line. Concrete Example: http://zsvalley.uhome.net/email/index.php.
The following is the complete source code: (Any questions please email:zsvalley@cmmail.com)
if ($ok = = ' yes ') {
Setcookie ("Yname", $yname);
Setcookie ("Yemail", $yemail);
if (!eregi ("^[_.0-9a-z-]+@" ([0-9a-z][0-9a-z-]+.) +[a-z]{2,3}$ ", $yemail)) {
echo "Please fill in your email address correctly!" Return ";
}elseif (!eregi ("^[_.0-9a-z-]+@" ([0-9a-z][0-9a-z-]+.) +[a-z]{2,3}$ ", $femail)) {
echo "Please fill in your friend's email address correctly!" Return ";
}else{
$message = $fname. "Hello: nn your friend." $yname. " I have a letter to say to you: N-----------------------------------n ". $comments." n-----------------------------------nnn Services: Http://zsvalley.uhome.net/email/nn Valley Network no bounds/HTTP/ valley.coc.cc N─────────────────────────n ";
Email send
Mail ($femail, $title, $message, "from: $yemail");
echo nl2br ($message);
$ok = ' no ';
echo "". NL2BR ($message)."
Back to send Page";
}
Exit ();
}
?>
<title>Recommend a webpage to a friend</title>
Quick Email System!
"The copyright of this article is owned by the author and house Orso near net, if need to reprint, please specify the author and source"
The above describes a very practical email.163.com a complete email sending program, including the content of email.163.com, I hope that the PHP tutorial interested in a friend helpful.