ldoozer Posted March 5, 2007 Share Posted March 5, 2007 Can anyone recommend a comprehensive php form mailer script that includes common validation rules such as checks for valid email addresses, phone numbers etc? Link to comment https://forums.phpfreaks.com/topic/41279-php-mailer-script/ Share on other sites More sharing options...
monk.e.boy Posted March 5, 2007 Share Posted March 5, 2007 http://uk.php.net/mail try that ;) monk.e.boy Link to comment https://forums.phpfreaks.com/topic/41279-php-mailer-script/#findComment-199995 Share on other sites More sharing options...
redarrow Posted March 5, 2007 Share Posted March 5, 2007 There you go you work the rest out then were help from there ok. There only examples but use them study them and have a go! email code <?php $email="[email protected]"; if(eregi("^[a-z0-9\-\_]{1,25}@[a-z0-9\_\-]{1,25}\.+[a-z]{1,3}$",$email)){ echo" your email is: $email"; }else{ echo"this email of your's $email is wrong format"; } ?> phone code <?php $phone="02076975656"; if(eregi("^[0-9]{1,15}$",$phone)){ echo" your email is: $phone"; }else{ echo"this email of your's $phone is wrong format"; } ?> email code </php $to = '[email protected]'; $subject = 'Wakeup bob!'; $message = '<b>yo</b>, whassup?'; $headers = "From: [email protected]\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; // Send mail($to, $subject, $message, $headers); Link to comment https://forums.phpfreaks.com/topic/41279-php-mailer-script/#findComment-200014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.