Forum Moderators: coopster
to be sent to my email address.
so i search the internet for a pice of php code i could use.
I found [thescripts.com...]
When i fill in this form and check my email i get the message:
"Hello ****,
We thank
you again for using our form and telling
us your option
about our site
This is important to us so we can know how
to improve.
Thank you once again.
"
this email displays that it is from CGI-Mailer. I dont know what this is but i would like it to be the email of the companies email address.
How would i do this?
Thanks
It is widely used for precisely what you describe and has been for more years than I can remember.
The big deal with form to mail scripts is that there should be no possible way for the script to email anyone other than the email addresses you designate.
Contact your hosting provider, they should be able to point you to a script they allow that should work for you.
This is my code:
======================================================
<?
PRINT "Greetings $name, thank you for filling out our";
PRINT "form.";
PRINT "<TABLE border=0 width=500";
PRINT "cellspacing=0 cellpadding=7>"; PRINT "<TR><TD>"; PRINT "In the form, you stated that our site";
PRINT "$status. Thank you for your input."; PRINT "We will send you more information about our site";
PRINT "in an email to $email.";
PRINT "If you have any more comments, feel free to reply.";
PRINT "</TD></TR></TABLE>";
mail("info@example.co.uk", "An Opinion", "$name just
used the form.\n\nThey stated that our site $opinion.", );
?>
======================================================
I would like to impement the following code into it code so that i can get the copanies email address in the "From" part of the email address:
======================================================
mail("bireland@example.com", "the subject", "Line
1\nLine 2\nLine 3", "From: you@example.com\nReply-To:
me@example.com\n);
======================================================
[edited by: coopster at 10:18 pm (utc) on Nov. 25, 2004]
[edit reason] generalized urls [/edit]
Basics of Submitting and Emailing Forms with PHP [webmasterworld.com]