Blogging the technics

news , facts , knowledge , php , android , jquery ...etc

Wednesday, March 31, 2010

php-smtp-email-validation

Download the class file http://code.google.com/p/php-smtp-email-validation/downloads/list

Example :
// include SMTP Email Validation Class
require_once
('smtp_validateEmail.class.php');

// the email to validate
$email
= 'user@example.com';
// an optional sender
$sender
= 'user@mydomain.com';
// instantiate the class
$SMTP_Validator
= new SMTP_validateEmail();
// turn on debugging if you want to view the SMTP transaction
$SMTP_Validator
->debug = true;
// do the validation
$results
= $SMTP_Validator->validate(array($email), $sender);
// view results
echo $email
.' is '.($results[$email] ? 'valid' : 'invalid')."\n";

// send email?
if ($results[$email]) {
//mail($email, 'Confirm Email', 'Please reply to this email to confirm', 'From:'.$sender."\r\n"); // send email
} else {
echo
'The email addresses you entered is not valid';
}
Posted by Unknown at 2:27 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Facebook Badge

Rizvi Iqubal

Create Your Badge

Blog Archive

  • ►  2015 (3)
    • ►  June (3)
  • ►  2014 (2)
    • ►  June (1)
    • ►  April (1)
  • ►  2012 (3)
    • ►  August (3)
  • ►  2011 (2)
    • ►  August (1)
    • ►  July (1)
  • ▼  2010 (14)
    • ►  September (2)
    • ►  May (1)
    • ►  April (6)
    • ▼  March (4)
      • php-smtp-email-validation
      • Load the Joomla scripts in a Non-Joomla PHP Script
      • Joomla User Authentication Script For External web...
      • New Website for Greenlemon: Internet Marketing & W...
    • ►  January (1)
  • ►  2009 (8)
    • ►  July (3)
    • ►  June (5)
  • ►  2006 (12)
    • ►  July (2)
    • ►  May (2)
    • ►  April (1)
    • ►  March (2)
    • ►  February (2)
    • ►  January (3)

Popular Posts

  • Get Menu Alias in Joomla
    function getAlias(){ $theMenu = JSite::getMenu(); $theActiveMenu = $theMenu->getActive(); return $theActiveMenu->alias; }
  • Problem with File.renameTo in java file io
    renameTo method in java.io.file may not work always [For eg: During File Upload - if destination and source is in different file system,...
  • Joomla User Authentication Script For External websites
    $query="SELECT password FROM `jos_users` WHERE username='".$_POST["userid"]."'"; $result = mysql_qu...
  • Access joomla session from external pages
    define ( '_JEXEC', 1 ) ; define ('JPATH_BASE', dirname ( __FILE__ ) ) ;// this is when we are in the root defin...
  • blue tooth security
    Bluetooth Security In any wireless networking setup, security is a concern. Devices can easily grab radio waves out of the air, so people wh...
  • Print Mysql Database Structure Using PHP
    <?php $HOSTNAME = 'localhost'; $USERNAME = 'root'; $PASSWORD = ''; $DBNAM...
  • Closed-Source PHP
    To some developers, one of the large drawbacks to PHP is that it provides no official method for distributing closed-source, binary web appl...
  • Overriding struts validate method for showing custom error message
    Overriding struts validate method for showing custom error message during FileUpload @SuppressWarnings("unchecked") pub...
  • Load the Joomla scripts in a Non-Joomla PHP Script
    define ( '_JEXEC' , 1 ) ; define ( '_VALID_MOS' , 1 ) ; // JPATH_BASE should point to Joomla!'s root directory defin...
  • GrabText Chrome App
    Check out Chrome App GrabText we developed GrabText Chrome App GrabText V 0.1 is a Free Chrome App to Grab the Text to your phone. Sc...

Total Pageviews

Blog By rizviiqubal@gmail.com. Simple theme. Theme images by chuwy. Powered by Blogger.