// specify the mail server and it depends upon the server config :: e.g. mail.somedomain.org OR smtp.somedomain.org ini_set("SMTP","smtp.docsrefinishing.com"); // OK with port 25 unless it is set up for something else :: 8889 is also a valid SMTP Port ini_set("smtp_port","25"); // specify the return address to use :: usually the same as the FROM line below but could be from any valid email address at this domain ini_set('sendmail_from', 'root@docsrefinishing.com'); // Set parameters of the email :: to, subject, message etc. // $ message includes the string of fields from the form page // $to = "lisa@docsrefinishing.com" $to = "Suzcrotty3@aol.com"; $subject = "Web Inquiry Submission"; $message = // use a period . between each element // each non-variable element should be in double quotes including a space which is . " " . // use "\r\n" as a single line break, 2 of them for a para break // note the use of $_REQUEST plus the field name variable in single quotes in brackets "You have received an inquiry from the Website. The details are below." . "\r\n" . "\r\n" . "NAME: " . $_REQUEST['name_field'] . "\r\n" . "\r\n" . "ADDRESS: " . "\r\n" . "\r\n" . $_REQUEST['street_field'] . "\r\n" . $_REQUEST['city_field'] . " " . $_REQUEST['state_field'] . " " . $_REQUEST['zip_field'] . "\r\n" . "\r\n" . "PHONE: " . $_REQUEST['telephone_field'] . "\r\n" . "\r\n" . "EMAIL: " . $_REQUEST['email_field'] . "\r\n" . "\r\n" . "COMMENTS: " . "\r\n" . $_REQUEST['question_comment'] ; $from = "root@docsrefinishing.com"; $headers = "From: $from"; // mail is the function that sends the email. mail($to,$subject,$message,$headers); ?>