poston Posted September 14, 2009 Share Posted September 14, 2009 I have this code that I copied and I trying to make it work on IIS the PHP.ini file is set correct with smtp. But for some reason it not working I'm new to php and trying learn to ad to my resume. <?php $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name == true ) { $sender = $contact_email; $receiver = [email protected]"; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "Name: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP: $client_ip \n\nFlash Contact Form provided by http://www.webshelb.net"; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?> Link to comment https://forums.phpfreaks.com/topic/174215-mail-code-for-iis/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.