sendmail path in the mail() function
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 Code:
<?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\n"
."Reply-To: webmaster@$servername\r\n"
."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;)
The URL still doesn's appear in the email
The form gets sent, but the URL is not included in the message. It is just blank!
Here is the link that connects to the email form page:
<a href="email.php?URL=<?$PHP_SELF?>">send this page to a friend </a>
Any ideas?
:confused: