Hello all,
Since I have only been use PHP for several months, I consider my self a
difinte beginner. I have been helped many times by this group. Special
thanks to Adam Lang and my buddy Joel Wickard. I thought I would post
some of the code in the hope it can help some others.
Sending an e-mail was describe in the PHP manual perfectly. My problem
was the Content Type in the header. I wanted to send an exact copy of
the form summited by the user to my client and also a copy back to the
user. I tried using the fourth agrument to the mail() command as
$mime="Content-Type:text/html", this did work fine. But, then I could
not send the from information. After viewing the code for a e-mail, I
noticed the Content Type var was immediately after the Subject. So, I
use the fourth agruement for the from information and place a carriage
return and Content-Type inside the Subject. Surprisely to me, it
worked.
<?php
$toname = 'Users Name';
$toaddress = 'userl@u...';
$subject = 'Subject Line (a note, make sure your hit the [enter]
at the end of this line)
Content-Type: text/html';
$fromname = 'my website';
$fromaddress = 'richard@a...';
$body = "
(place the normal html code here. do not use the html and /html tages.)
";
mail($toname."<".$toaddress.">", $subject, $body, "From:
".$fromname."<".$fromaddress.">");
$toname = $acct_email;
$toaddress = $sender;
mail($toname."<".$toaddress.">", $subject, $body, "From:
".$fromname."<".$fromaddress.">");
echo ("<b><br>Your Request as been sent.");
I hope this helps someone. As always, many thanks to this group.
Richard D. Williams