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:


Do I need to specify the path?

if (isset($mailnow)){ //if the user wants to mail the page
$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";
$parameters="From: $yourname\\r\
    ."Reply-To: webmaster@$servername\\r\

mail ($to, $subject, $message,$parameters );


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>

    <input type="hidden" name="URL" value="URL"><br>
    <input type="submit" name="submit_tip" value="mailnow">

//the link for the user to send mail with
<a href="email.php"?URL=<?=$PHP_SELF?>>Send this page to a friend</a>



See other thread in PHP it is set in the php.ini the function mail() comes complete :smiley:

let me borrow your thread ok philips?? :slight_smile:

i was also making a form mailer from my site and i noticed that even thought i included “Reply-to:”, the received email only included somthing like “”…

my site is hosted on sourceforge so i guess that’s why it appended the “” is there anyway for the actual address to appear??

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?

okay girls and boys …

we are gonna take a little field trip :smiley:

First stop PHP website

Here we can see the proper way to work with the mail() function in php…

As you can see the $parameters (as philip calls them) I prefer $header since it is the mail header… is optional and can contain header info like from: reply-to: etcetc (read the function at php!!)

next stop articles :bouncy2:

Here you can see that you can have the “power” of HTML in your email… (if you really want to)

Well… I think thats enough travelling for now…