How To Send Email From A PHP Code Script



How To Send Email From A PHP Code Script
 (382) Find work at Home Jobs
How To Send Email From A PHP Code Script
Post Description:
Post Tags: how, to, send, email, from, a, php, code, script,
This Post Has Been Viewed 151 Times Since Tue Apr 15, 2008 12:35 pm Posted By kiosky with 2 replies
How To Send Email From A PHP Code Script
i want to know how i can send email with php from withing my script

lets say i have a contact us form and i want to have the form once its submitted and completed by the user or the customer it will send an email automatically to me

can that be done?

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About How To Send Email From A PHP Code Script




:: 1 :: #50281 - Reply By hostman On Tue Apr 15, 2008 12:42 pm
sending email from a php script code is possible all you have to do is use this function:

mail()



here is a simple example:
:: 2 :: #50282 - Reply By hostman On Tue Apr 15, 2008 12:44 pm
<?
$recipient = "example@example.net"; // THIS WILL BE THE EMAIL WHERE THE FORM WILL BE SENT
$subject = "Contact Us Form "; // THE EMAIL SUBJECT
$forminfo =
" Hello, .\n
Your web form was submited by someone on your wesbite\n";

mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email");
?>