ag4nt0range Posted May 4, 2010 Share Posted May 4, 2010 could some someone please help me add remote and local smtp server support to this php code <?php $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name == true ) { $sender = $contact_email; //Put your email below $receiver = "[email protected]"; $email_body = "Name: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message"; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); if( mail( $receiver, "Mail form my Contact Form", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?> Link to comment https://forums.phpfreaks.com/topic/200703-php-contact-form/ Share on other sites More sharing options...
khr2003 Posted May 19, 2010 Share Posted May 19, 2010 You can use phpmailer for all sorts of email process with advanced or minimal functionality. It contains a highly advanced SMTP functionality that is can seamlessly integrate into any kind of application it is free and in php Link to comment https://forums.phpfreaks.com/topic/200703-php-contact-form/#findComment-1060465 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.