Hey ya,
Am i right or wrong in thinking this should work?
I want to tell the user that an email has been sent to their friend, IF it sends sucessfully, & if not, tell them the email failed..
Is there a code error or?
PHP Code:if(mail($to_name."<".$to_email.">", $subject, $message, $headers)){
echo "An email has been sent to ".$to_name." <a href=\"mailto:".$to_email."\">".$to_email."</a> telling him/her about ".$sitename."<BR>\n";
echo "Thank you for suggesting our website to your friend!<BR>\n<BR>\n";
echo "<a href=\"".$baseurl."\">Return To The Main Page</a>\n";
}else{
echo "Failed to send the email to <a href=\"mailto:".$to_email."\">".$to_email."</a>\n";
}




Reply With Quote