Skip to content

Commit

Permalink
initial checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailxu committed Jul 30, 2012
1 parent 2f311d3 commit cad6a67
Show file tree
Hide file tree
Showing 32 changed files with 5,616 additions and 0 deletions.
4 changes: 4 additions & 0 deletions emailcheck.php
@@ -0,0 +1,4 @@
<form action="emailchecker.php" method="post">
Email Address: <input type="text" name="email" /><br/>
<input type="submit" />
</form>
33 changes: 33 additions & 0 deletions emailchecker.php
@@ -0,0 +1,33 @@
<?php

/**
* Example 1
* Validate a single Email via SMTP
*/
$fname=$_POST["email"];

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

// the email to validate
$email = $fname;
// 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';
}


?>
33 changes: 33 additions & 0 deletions example1.php
@@ -0,0 +1,33 @@
<?php

/**
* Example 1
* Validate a single Email via SMTP
*/


// 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';
}


?>
31 changes: 31 additions & 0 deletions example2.php
@@ -0,0 +1,31 @@
<?php

/**
* Example 2
* Validate a single Email via SMTP
*/

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

// the email to validate
$emails = array('user@example.com', 'user2@example.com');
// an optional sender
$sender = 'user@yourdomain.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($emails, $sender);

// view results
foreach($results as $email=>$result) {
// send email?
if ($result) {
//mail($email, 'Confirm Email', 'Please reply to this email to confirm', 'From:'.$sender."\r\n"); // send email
} else {
echo 'The email address '. $email.' is not valid';
}
}
?>
11 changes: 11 additions & 0 deletions mail/.project
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>php-smtp-email-validation</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
23 changes: 23 additions & 0 deletions mail/.svn/all-wcprops
@@ -0,0 +1,23 @@
K 25
svn:wc:ra_dav:version-url
V 21
/svn/!svn/ver/2/trunk
END
example1.php
K 25
svn:wc:ra_dav:version-url
V 34
/svn/!svn/ver/4/trunk/example1.php
END
example2.php
K 25
svn:wc:ra_dav:version-url
V 34
/svn/!svn/ver/4/trunk/example2.php
END
smtp_validateEmail.class.php
K 25
svn:wc:ra_dav:version-url
V 50
/svn/!svn/ver/3/trunk/smtp_validateEmail.class.php
END
64 changes: 64 additions & 0 deletions mail/.svn/entries
@@ -0,0 +1,64 @@
8

dir
2
https://php-smtp-email-validation.googlecode.com/svn/trunk
https://php-smtp-email-validation.googlecode.com/svn



2008-09-28T02:10:09.709021Z
2
bucabay


svn:special svn:externals svn:needs-lock











00e49c88-8cf3-11dd-86ef-f1224e8fcbc0

example1.php
file
4



2008-09-28T03:16:54.635680Z
b7397ac197a4c6a3c227442431848079
2008-09-28T03:20:51.515904Z
4
bucabay

example2.php
file
4



2008-09-28T03:16:37.182696Z
2ac7c4f9a9e27fef4b29f4f17f2d144d
2008-09-28T03:20:51.515904Z
4
bucabay

smtp_validateEmail.class.php
file
3



2008-09-28T03:06:48.932260Z
7ba710fb3cdde5abeabb070d57b5b657
2008-09-28T03:18:58.457624Z
3
bucabay

1 change: 1 addition & 0 deletions mail/.svn/format
@@ -0,0 +1 @@
8
33 changes: 33 additions & 0 deletions mail/.svn/text-base/example1.php.svn-base
@@ -0,0 +1,33 @@
<?php

/**
* Example 1
* Validate a single Email via SMTP
*/


// 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';
}


?>
31 changes: 31 additions & 0 deletions mail/.svn/text-base/example2.php.svn-base
@@ -0,0 +1,31 @@
<?php

/**
* Example 2
* Validate a single Email via SMTP
*/

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

// the email to validate
$emails = array('user@example.com', 'user2@example.com');
// an optional sender
$sender = 'user@yourdomain.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($emails, $sender);

// view results
foreach($results as $email=>$result) {
// send email?
if ($result) {
//mail($email, 'Confirm Email', 'Please reply to this email to confirm', 'From:'.$sender."\r\n"); // send email
} else {
echo 'The email address '. $email.' is not valid';
}
}
?>

0 comments on commit cad6a67

Please sign in to comment.