Web Hosting Talk







View Full Version : PHP Sending Email problem Please Help


vh164
08-31-2002, 02:27 PM
Hello,

My provider is using CPanel

i upload that php script but shows email sent but never sent
Can you please let me know if i have error in my script:

<?php

if ($address=="") {

echo "<form action=\"mailtest.php\" method=get><p>Address to email: <input type=text name=address></p>";
echo "<p><input type=submit value=\"Send email\"></p>";

} else {

$subject = "Testing mail() function";
$message = "This is a test email";

mail($address,$subject,$message,"From: \"Mail Test\" <$address>");

echo "<p>Mail sent.";
}
?>



Thanks Alot

TrueBart
08-31-2002, 07:00 PM
Maybe you should test it out and see if values like $address actually have an email in them.

Myth_Pharoah
09-01-2002, 05:21 AM
Yep!
Print is just before the mail function.