|
Posted by Johnny on 09/13/06 17:55
"Tha RagMan" <wmercier.nospam@shelby.net> wrote in message
news:i9sfg2hjacf6fhug9387ksm5qm6feg7aoj@4ax.com...
> I have a little program that created the following PHP script to
> handle a basic form and email the results. What it doesn't do and I
> can't get it to do is send a separate email with inputted results data
> to another email address without it showing in the "To" header of
> either msgs. Alternately I would like for it to do a BCC. I have tried
> a number edits to the script but nothing so far has worked. Could
> someone with more PHP knowledge then I give me the lines of code that
> will accomplish either the separate email without displaying both
> email addys or BCC? I would be very appreciative if you could lend a
> helping hand with my problem.
> Many Thanks
> Tha RagMan
>
> <?php
> @$rec_mailto = addslashes($_POST['rec_mailto']);
> @$rec_subject = addslashes($_POST['rec_subject']);
> @$rec_thanks = addslashes($_POST['rec_thanks']);
> @$Name = addslashes($_POST['Name']);
> @$Email = addslashes($_POST['Email']);
> @$Company = addslashes($_POST['Company']);
> @$Street = addslashes($_POST['Street']);
> @$City = addslashes($_POST['City']);
> @$State = addslashes($_POST['State']);
> @$Zip = addslashes($_POST['Zip']);
> @$Phone = addslashes($_POST['Phone']);
> @$Comments = addslashes($_POST['Comments']);
>
> // Validation
> file://Sending Email to form owner
> $pfw_header = "From: $Email\n"
> . "Reply-To: $Email\n";
> $pfw_subject = "Response Form";
> $pfw_email_to = "me@myhost.com";
> $pfw_message = "rec_mailto: $rec_mailto\n"
> . "rec_subject: $rec_subject\n"
> . "rec_thanks: $rec_thanks\n"
> . "Name: $Name\n"
> . "Email: $Email\n"
> . "Company: $Company\n"
> . "Street: $Street\n"
> . "City: $City\n"
> . "State: $State\n"
> . "Zip: $Zip\n"
> . "Phone: $Phone\n"
> . "Comments: $Comments\n";
> @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
>
> echo("<p align='center'><font face='Arial' size='3'
> color='#FF0000'>Thanks for your response ! ! !</font></p>");
> ?>
>
Hey Ragman,
this works for me:
$headers = "From: you@yours.com"."\r\n" .
"Reply-To: reply@yours.com" . "\r\n" .
"Bcc: you.wont.see.me@yours.com" . "\r\n" .
"X-Mailer: PHP/" . phpversion();
I'll leave you to do it with your vars.
/* Johnnie*/
Navigation:
[Reply to this message]
|