Per inviare posta al webmaster di un sito.
<?
$atdomain = ""; // use to specify domain name, ex. @yourdomain.com
NOT just yourdomain.com
$site_header = ""; // If you want to use your own site header, enter
the URL to that here.
$site_footer = ""; // If you want to use your own site footer, enter
the URL to that here.
$default_subject = "Results from Ask the Webmaster";
if(!$to) {
die("No recipient was found!");
}
if(!$atdomain) {
$to = strtr($to,":","@");
}
if(!$subject) {
$subject = $default_subject;
}
if($name == "" || $email == "" || $message == "")
{
die("Form fields were left empty, please try again.");
}
$body = "Name: $name\n\nE-Mail: $email\n\nMessage:\n$message";
mail($to . $atdomain, $subject, $body . "\n\n\n\nPowered by Ask the Webmaster
1.0", "From: $email");
if($site_header) {
include($site_header);
}
else {
echo "<html><head><title>Ask the Webmaster</title></head><body
bgcolor=\"#ffffff\" text=\"#000000\">";
}
print "\n<b>Mail sent.</b><br>Thanks for asking the webmaster!
We'll get back to you as soon as we can.<p>\n";
print "You said:<br><pre>$body</pre><br>";
if($site_footer) {
include($site_footer);
}
else {
echo "<br><i>Ask the Webmaster</i> is ©2001 YOA/LSYF/YoAi<body></html>";
}
?>
![]()
![]()