In the following pair of scripts, is the sendmail path configured properly? On my web host’s server my actual sendmail path is:
/usr/sbin/sendmail/
Do I need to specify the path?
<?php
if (isset($mailnow)){ //if the user wants to mail the page
$to=$email;
$subject="$yourname has sent you a web page";
$message="Dear $name, <br><br>$message<br><br>Take a look at this web page <br><br>$URL<br><br>$yourname";
$servername="mydomain.com";
$parameters="From: $yourname\\r\
"
."Reply-To: webmaster@$servername\\r\
"
."sendmail:/usr/sbin/sendmail/";
mail ($to, $subject, $message,$parameters );
}
?>
<?php
if (isset($mailpage)): //if the user wants to mail the page
?>
<form action="<?=$PHP_SELF?>" method="post">
<p>Enter your name:<input type="text" name="yourname" size="40"></p><br>
<p>Enter your friend's name:<input type="text" name="name" size="40"></p><br>
<p>Enter your friend's e-mail address:<input type="text" name="email" size="40"></p><br>
<p>Enter a note to send along with the page:<br>
<textarea cols="40" rows="10" name="message" wrap></textarea>
</p>
<input type="hidden" name="URL" value="URL"><br>
<input type="submit" name="submit_tip" value="mailnow">
</p>
</form>
<?php
//the link for the user to send mail with
?>
<a href="email.php"?URL=<?=$PHP_SELF?>>Send this page to a friend</a>
TIA
p;)