Git Product home page Git Product logo

smtp-validate-email's People

Contributors

imajim avatar jrfnl avatar kevin39 avatar librevlad avatar neilime avatar rafaelgss avatar snapshotpl avatar volch avatar webysther avatar zackkatz avatar zytzagoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smtp-validate-email's Issues

error on validate a specific email address

I can send you the email address. Please send me an email and I will reply.

thanks

[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'SMTP_Validate_Email_Exception_Timeout' with message 'Timed out in recv' in /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php:627, referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: Stack trace:, referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #0 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(651): SMTP_Validate_Email->recv(3), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #1 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(555): SMTP_Validate_Email->expect(Array, 3), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #2 /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php(312): SMTP_Validate_Email->rset(), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #3 /var/www/clients/client6/web12/web/tools/mailcheck/validateajax.php(43): SMTP_Validate_Email->validate(Array, 'admin@xxxx...'), referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: #4 {main}, referer: http://www.mysite.com/mytools/mycheck/
[Fri Jun 27 10:20:06 2014] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: thrown in /var/www/clients/client6/web12/web/tools/mailcheck/smtp_validateEmail.class.php on line 627, referer: http://www.mysite.com/mytools/mycheck/

Timed out in recv

Hey there , first thx for this cool stuff.
Second , im using you lib with symfony and JMSJobQueueBundle the JMSJob is just creating a job for daemon ( im using supervisor ) .
The job of this guys is to validate a list of emails .
For test purpose ive started a job with about 3k emails.

the code is simple enough :

 $validator = new ValidatorEmail($mail,$this->sender,array(
                'domainMoreInfo' => true,
                'delaySleep' => array(1,10)
                'noCommIsValid' => 0,
                'catchAllIsValid' => 1
            ));
            $results = $validator->getResults();

This is just a snippet from my ValidationCommand , but this part is the important and most time consuming .
Perhaps it is not a good idea to run such a bunch of emails atones but acctualy should be working within a daemon and here i came to the "Timed out in recv " after 16687 seconds of runing as daemon , its about 5 hours.

So maybe i can raise the timeout value ?

Oh and yeh the stack trace :

 ExceptionTimeout: Timed out in recv  -+

    in /var/www/html/validator/vendor/ddtraceweb/smtp-validator-email/lib/SmtpValidatorEmail/Smtp/Smtp.php at line 436  -
                // have we timed out?
                $info = stream_get_meta_data($this->socket);
                if (!empty($info['timed_out'])) {
                    throw new ExceptionTimeout('Timed out in recv');
                }
                // did we actually receive anything?
                if ($line === false) {
    at Smtp ->recv ('120')
    in /var/www/html/validator/vendor/ddtraceweb/smtp-validator-email/lib/SmtpValidatorEmail/Smtp/Smtp.php at line 464  +
    at Smtp ->expect ('220', '120')
    in /var/www/html/validator/vendor/ddtraceweb/smtp-validator-email/lib/SmtpValidatorEmail/Smtp/Smtp.php at line 232  +
    at Smtp ->helo ()
    in /var/www/html/validator/vendor/ddtraceweb/smtp-validator-email/lib/SmtpValidatorEmail/ValidatorEmail.php at line 145  +
    at ValidatorEmail ->__construct ('[email protected]', '[email protected]', array('domainMoreInfo' => true, 'delaySleep' => array('1', '10'), 'noCommIsValid' => '0', 'catchAllIsValid' => '1'))
    in /var/www/html/validator/src/Magnetomedia/AdminBundle/Command/ValidateFileCommand.php at line 41  +
    at ValidateFileCommand ->execute (object(ArgvInput), object(ConsoleOutput))
    in /var/www/html/validator/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php at line 252  +
    at Command ->run (object(ArgvInput), object(ConsoleOutput))
    in /var/www/html/validator/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php at line 896  +
    at Application ->doRunCommand (object(ValidateFileCommand), object(ArgvInput), object(ConsoleOutput))
    in /var/www/html/validator/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php at line 193  +
    at Application ->doRun (object(ArgvInput), object(ConsoleOutput))
    in /var/www/html/validator/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php at line 96  +
    at Application ->doRun (object(ArgvInput), object(ConsoleOutput))
    in /var/www/html/validator/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php at line 44  +
    at Application ->doRun (object(ArgvInput), object(ConsoleOutput))
    in /var/www/html/validator/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php at line 124  +
    at Application ->run (object(ArgvInput))
    in kernel.root_dir/console at line 28  +

Fatal error: Uncaught exception 'SMTPValidateEmail\Exceptions\NoConnection' with message 'No connection'

Caused by (Validate.php):

private function throwIfNotConnected() { if (!$this->connected()) { throw new NoConnectionException('No connection'); } }

Because of en empty class in NoConnection.php:

`
class NoConnection extends Exception
{

}
`

Test e-mail : info(at)falkopingshyresbostader(dot)se

p.s. read this, may help -> http://www.smashcompany.com/technology/object-oriented-programming-is-an-expensive-disaster-which-must-end :)

Does not Work

i tried your code on different servers
it returns false for valid email too

smtp authentication

I want to write a script to validate a list with multi smtp, How i can connect smtp server with authentication ( I mean host, user, password and email)?

i need help :(

i have all working good, but all mails i try verify return erro

550-Please turn on SMTP Authentication in your mail client.

how i fix this to work in @yahoo? @gmail? and others?

Alternative port

Is there any way of asking the validator to use an alternative port when connecting to the remote SMTP server (i.e. a port other than 25)?

Parse error

I have precisely followed the instructions, installed with composer, and created a PHP file containing a copy past of the first exemple, on a freshly installed centos 7.

i get this output:

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/html/vendor/zytzagoo/smtp-validate-email/src/Validator.php on line 982

Any suggestions ?

thanks a lot

fatal error when validating a specific domain

If you try to validate with the domain [email protected] , it shows this fatal error output:

PHP Fatal error: Uncaught SMTPValidateEmail\Exceptions\NoMailFrom: Need MAIL FROM before RCPT TO in /.../composer/vendor/zytzagoo/smtp-validate-email/src/Validator.php:613
Stack trace:
#0 /.../composer/vendor/zytzagoo/smtp-validate-email/src/Validator.php(344): SMTPValidateEmail\Validator->rcpt('xxx@mailo....')

Fatal error when remote closed the connection.

<?php

require('smtp-validate-email.php');

$from = '[email protected]'; // for SMTP FROM:<> command
$email = '[email protected]';

$validator = new SMTP_Validate_Email($email, $from);
$smtp_results = $validator->validate();

var_dump($smtp_results);

Result:

PHP Fatal error:  Uncaught SMTP_Validate_Email_Exception_No_Connection: No connection in /tmp/smtp-validate-email.php:632
Stack trace:
#0 /tmp/smtp-validate-email.php(498): SMTP_Validate_Email->send('EHLO kn007.net')
#1 /tmp/smtp-validate-email.php(466): SMTP_Validate_Email->ehlo()
#2 /tmp/smtp-validate-email.php(284): SMTP_Validate_Email->helo()
#3 -(9): SMTP_Validate_Email->validate()
#4 {main}
  thrown in /tmp/smtp-validate-email.php on line 632

I think it should return false.

Fatal_error

Fatal error: Call to a member function format() on a non-object in /var/hosts/video/data/site/smtp-validate-email.php on line 844

How fix it ??? Ty for answer

Hotmail false negative result.

Just tested the code on win2012 server, IIS8
All domains work good but hotmail!

is there any trick for hotmail or the code just can not handle hotmail?

test email is [email protected]
this is my valid test email

here is the dumped result from your code:

array(2) { ["[email protected]"]=> bool(false) ["domains"]=> array(1) { ["hotmail.com"]=> array(2) { ["users"]=> array(1) { [0]=> string(12) "test1qaz1qaz" } ["mxs"]=> array(5) { ["mx3.hotmail.com"]=> int(5) ["mx4.hotmail.com"]=> int(5) ["mx1.hotmail.com"]=> int(5) ["mx2.hotmail.com"]=> int(5) ["hotmail.com"]=> int(0) } } } }

Thank you,

Kevin

recv: 550 IP blacklisted by Spamhaus

I'm receiving a 550 error from SMTP due to spamhaus blacklist, this is not really an invalid mail error beause the email address was not given yet but I received a 550 error! This error is thrown just after the connection.
Is it possible somehow ignore this errors?

[2021-05-17T15:53:02.318087+0000] Connecting to smtp-in.libero.it:25


[2021-05-17T15:53:02.359458+0000] Connected to smtp-in.libero.it:25 successfully


[2021-05-17T15:53:02.360149+0000] <<<recv: 550 smtp-26.iol.local smtp-26.iol.local IP blacklisted by Spamhaus, https://www.spamhaus.org/query/ip/79.50.186.118  [smtp-26.iol.local; LIB_101]


[2021-05-17T15:53:02.374261+0000] Unexpected response after connecting: 550 smtp-26.iol.local smtp-26.iol.local IP blacklisted by Spamhaus, https://www.spamhaus.org/query/ip/79.50.186.118  [smtp-26.iol.local; LIB_101]


[2021-05-17T15:53:02.374288+0000] Closing socket to smtp-in.libero.it:25

Use error_clear_last()

Great work. huge fan of the library, finally, no more bounced emails in my inbox ;)

During validation, the library can trigger various PHP errors, which get saved in the variable returned by error_get_last()

On execution end of our scripts we use error_get_last() to check if any errors occurred and log/report them accordingly.

Given that these errors are expected within your library, it might make sense to call error_clear_last() in those cases? Can't think of any negative side effects.

Feature request DNS override

Ability to specify the MX server(s) to use, so we can override DNS for testing if SMTP mail service is functioning.
Thanks.

Your access to this mail system has been rejected due to the sending MTA's poor reputation.

I have set my sender to my Gmail address: [email protected]
When I am trying to verify an email (Which is correct) I am getting an error:

[2018-05-24T06:21:28.568919+0000] <<<recv: 554 Your access to this mail system has been rejected due to the sending MTA's poor reputation. If you believe that this failure is in error, please contact the intended recipient via alternate means.

and the $results[$emails] returns False for this.

When I checked the same email with other email checking tools, they return True

Do I need to buy a domain and configure SPF records for my mail server to get the correct results?

Note: Currently I am using my localhost (XAMPP)

Connection timeout is not working

use SMTPValidateEmail\Validator as SmtpEmailValidator;

$validator = new SmtpEmailValidator('[email protected]', '[email protected]');
$validator->setConnectTimeout(1);
$smtpResults = $validator->validate();

It is waiting 3 minute

Bacause of timeout command_timeouts
If you send timeout using setTimeout - you need to use that setting

How to read the result as valid or invalid.

75% of the tested email addresses (existing and correct, existing but incorrect) gives the same $smtp_results array (except the address of course).

I have tried to use the $smtp_results[$email] which in some cases when the email address is correct will be equal to 1:

Array
(
    [[email protected]] => 1
    [domains] => Array
        (
            [entrustrock.nl] => Array
                (
                    [users] => Array
                        (
                            [0] => info
                        )

                    [mxs] => Array
                        (
                            [entrustrock.nl] => 0
                        )

                )

        )

)

But as described here above with some others correct addresses it will be empty and it will flag it as incorrect.

Can you please add in the read me file an example which will describe how we can use the returned array to detect if an email address is valid on invalid?

Regards

Version bump

The PR with the locale issue fixes has been merged nearly two years ago and it would be nice to have this patch available in composer without using "dev-master" as the version. So a version bump would be nice.

Invalid e-mails verified as true

i am using the code just like in the example given in the readme file, for really stupid emails like [email protected] it verifies as false, as expected but for emails like [email protected] it verifies as true, even though i know it is a fake email (i can look it up via another tool, Mautic, cant use to verify the email on the fly though).

Huge error when cheking with catch-all with PHP 8

I always get an exception when I check catchalls with the last Validate class.
It seems that the 550 error code is not in the list of authorized codes for RCPT TO command in that case.
I don't have this error when I'm not checking if the domain is a catch-all.

PHP Fatal error: Uncaught Error: Class "SMTPValidateEmail\Exceptions\UnexpectedResponse" not found in /home/dqe/email3/Validator.php:929
Stack trace:
#0 /home/dqe/email3/Validator.php(740): SMTPValidateEmail\Validator->expect()
#1 /home/dqe/email3/Validator.php(258): SMTPValidateEmail\Validator->rcpt()
#2 /home/dqe/email3/Validator.php(446): SMTPValidateEmail\Validator->acceptsAnyRecipient()
#3 /home/dqe/email3/Validator.php(399): SMTPValidateEmail\Validator->attemptMailCommands()
#4 /home/dqe/email3/Validator.php(334): SMTPValidateEmail\Validator->performSmtpDance()
#5 /home/dqe/email3/Validator.php(308): SMTPValidateEmail\Validator->loop()
#6 /home/dqe/email3/appel-smtp.php(155): SMTPValidateEmail\Validator->validate()
#7 {main}
thrown in /home/dqe/email3/Validator.php on line 929

All address at the same domain becomes invalid if the server responds with 421 4.7.0 Error: too many errors

I'm doing batch validations for my mail lists (ten thousends addresses) . A few email provider gives me error like below with varying account status (inactive, deleted, blocked etc):
550 5.1.1 <[email protected]>: Recipient address rejected: u'SMTP service is disabled for this account. AccountId: 12345678. Reason: The account is INACTIVE'
Unexpected response to RCPT TO: 550 5.1.1 <[email protected]>: Recipient address rejected: u'SMTP service is disabled for this account. AccountId: 12345678. Reason: The account is INACTIVE'
(I've changed the mailbox name to placeholder)

After errors like this all address at the same domain becomes invalid even if I got back 250 2.1.5 Ok for the most of them.

This problem only occurs if I'm validating large batches. If I only validate 50 or so the issue doesn't occur.

Using ipv6 address binding to prevent backlists

Hi,

I'm using your library to check a lots of e-mail addresses from a database.
I have IP addresses on my server and I bind those addresses to check e-mails.
But ipv4 are rare those days and those IPs are now blacklisted by Microsoft servers.

Do you know if there is a way to use IPV6 only with your lib?

simple truefalse?

Is it possible to get simple true false ie email valid or not using this?
Not talking about array dump

How does this code, works?

Hi,

I have installed it and can access it in browser. But I cant see any results. Where I will see if the email ids are bounced or correct?

Release

Hey,

there are a few commits to master since you last created a release. When do you plan to create a new release?

Call to a member function format() on bool in zytzagoo\smtp-validate-email\src\Validator.php on line 942.

Call to a member function format() on bool in C:\Users\Tobia\git\cinebot\SitoTicketing\vendor\zytzagoo\smtp-validate-email\src\Validator.php on line 942.

$date = \DateTime::createFromFormat('U.u', sprintf('%.f', microtime(true)))->format('Y-m-d\TH:i:s.uO');

This error is related to the decimal separator of the system. If it is other than "." it fails.

It should be replaced with:

$date = \DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->format('Y-m-d\TH:i:s.uO');

Need MAIL FROM before RCPT TO

Fatal error: Uncaught SMTPValidateEmail\Exceptions\NoMailFrom: Need MAIL FROM before RCPT TO

   $sender = '[email protected]';
    $unknown_email = '[email protected]';
    $unknown_email = trim($unknown_email);
    if (!empty($unknown_email)) {
        var_dump($unknown_email);
        $validator = new SmtpEmailValidator($unknown_email, $sender);
        $result = $validator->validate();
        var_dump($result);
        $log = $validator->getLog(); var_dump($log);
        if ($result[$unknown_email]) {
            file_put_contents ('valid_emails.txt', $unknown_email."\n", FILE_APPEND);
        }
        else {
            file_put_contents ('invalid_emails.txt', $unknown_email."\n", FILE_APPEND);
        }
    }

Other check the mailing address handles correctly without error. Only this email gives an error.

Here is the debug output:

array (size=1)
'domains' =>
array (size=1)
'psmural.ru' =>
array (size=2)
'users' =>
array (size=1)
0 => string 'ogmetr2' (length=7)
'mxs' =>
array (size=2)
'mail.psmural.ru' => int 10
'psmural.ru' => int 0
array (size=29)
0 => string '[2019-05-20T14:15:39.460138+0000] MX records (psmural.ru): Array
(
[mail.psmural.ru] => 10
[psmural.ru] => 0
)
' (length=119)
1 => string '[2019-05-20T14:15:39.460251+0000] Connecting to mail.psmural.ru:25' (length=66)
2 => string '[2019-05-20T14:15:39.523915+0000] Connected to mail.psmural.ru:25 successfully' (length=78)
3 => string '[2019-05-20T14:15:39.657394+0000] <<<recv: 220 mail.psmural.ru Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at Mon, 20 May 2019 19:17:33 +0500
' (length=160)
4 => string '[2019-05-20T14:15:39.657503+0000] send>>>: EHLO domain.com' (length=60)
5 => string '[2019-05-20T14:15:44.930552+0000] <<<recv: 250-mail.psmural.ru Hello [217.114.12.86]
' (length=86)
6 => string '[2019-05-20T14:15:44.930776+0000] <<<recv: 250-TURN
' (length=53)
7 => string '[2019-05-20T14:15:44.930947+0000] <<<recv: 250-SIZE
' (length=53)
8 => string '[2019-05-20T14:15:44.931099+0000] <<<recv: 250-ETRN
' (length=53)
9 => string '[2019-05-20T14:15:44.931254+0000] <<<recv: 250-PIPELINING
' (length=59)
10 => string '[2019-05-20T14:15:44.931396+0000] <<<recv: 250-DSN
' (length=52)
11 => string '[2019-05-20T14:15:44.931546+0000] <<<recv: 250-ENHANCEDSTATUSCODES
' (length=68)
12 => string '[2019-05-20T14:15:44.931673+0000] <<<recv: 250-8bitmime
' (length=57)
13 => string '[2019-05-20T14:15:44.931757+0000] <<<recv: 250-BINARYMIME
' (length=59)
14 => string '[2019-05-20T14:15:44.931835+0000] <<<recv: 250-CHUNKING
' (length=57)
15 => string '[2019-05-20T14:15:44.931911+0000] <<<recv: 250-VRFY
' (length=53)
16 => string '[2019-05-20T14:15:44.931998+0000] <<<recv: 250-X-EXPS GSSAPI NTLM LOGIN
' (length=73)
17 => string '[2019-05-20T14:15:44.932075+0000] <<<recv: 250-X-EXPS=LOGIN
' (length=61)
18 => string '[2019-05-20T14:15:44.932153+0000] <<<recv: 250-AUTH GSSAPI NTLM LOGIN
' (length=71)
19 => string '[2019-05-20T14:15:44.932230+0000] <<<recv: 250-AUTH=LOGIN
' (length=59)
20 => string '[2019-05-20T14:15:44.932307+0000] <<<recv: 250-X-LINK2STATE
' (length=61)
21 => string '[2019-05-20T14:15:44.932385+0000] <<<recv: 250-XEXCH50
' (length=56)
22 => string '[2019-05-20T14:15:44.932468+0000] <<<recv: 250 OK
' (length=51)
23 => string '[2019-05-20T14:15:44.932574+0000] send>>>: MAIL FROM:[email protected]' (length=74)
24 => string '[2019-05-20T14:15:44.995840+0000] <<<recv: 250 2.1.0 [email protected]....Sender OK
' (length=87)
25 => string '[2019-05-20T14:15:44.996020+0000] send>>>: NOOP' (length=47)
26 => string '[2019-05-20T14:15:45.049014+0000] <<<recv: ' (length=43)
27 => string '[2019-05-20T14:15:45.050510+0000] No response in expect(): No response in recv' (length=78)
28 => string '[2019-05-20T14:15:45.050634+0000] Closing socket to mail.psmural.ru:25' (length=70)

Improving performance & question about catch-all checks

Hi!
Amazing work with the package.

Currently average verification request time is between 2-2.5 seconds.
Is there a way to shorten this?

With regards to checking catch-all, I can see the readme mentioned catch-all checking but I don't see the debug log or response providing any information on catch-all status. How can I go about accessing the response data for these checks?

Getting a 450 Request error [7.2]

I have the following result:


MX records (omprompt.com): Array
(
[cluster8.eu.messagelabs.com] => 10
[cluster8a.eu.messagelabs.com] => 50
[omprompt.com] => 0
)


Connecting to cluster8.eu.messagelabs.com:25


Connected to cluster8.eu.messagelabs.com:25 successfully


<<<recv: 
{"[email protected]":false,"domains":{"omprompt.com":{"users":["name"],"mxs":{"cluster8.eu.messagelabs.com":10,"cluster8a.eu.messagelabs.com":50,"omprompt.com":0}}}}

Closing socket to cluster8.eu.messagelabs.com:25

This shows me it found two servers, but only connected to one of them. Is that what you see too ?

Problem with a domain that seem to respond correctly

Hi, I'm using this lib on a daily basis.
I have found a problem with the domain bourdette (.com).

This domain can't be checked because there is an exception in the RECV function. With telnet it seems to work fine.

Does anyone can help?

Thanks,
Fabio Chelly

Timeout doesn't work

I'm extending class and inside function constructor i set timeout = 250(ms) but i when execute the script delay more time. Often it happen with email address hotmail.

saving results

hello, i am new at this i would like to know if there is a way of making the script to save the valid results, and also to make the script to get the emails for validation from a list.

Thanks

421 4.7.1 Intrusion prevention active

Hi,

First, thanks for great script. I'd like to see if this issue can be somehow resolved.
After sending bulk 100+ request I've got this error:

SMTP_Validate_Email_Exception_Unexpected_Response: 421 4.7.1 Intrusion prevention active for [my ip address][R] in SMTP_Validate_Email->expect() (line 658

If there's no good way to solve it, can it just be ignored and moved on?
Problem is that it breaks script completely and don't want to continue...

Microsoft Enhanced SMTP

Reading through the doc blocks you've made note that MS ESMTP doesn't follow RFC according to tracker ZF-1377. Will this not work on Microsoft domains? Awesome script by the way!

Return Invalid Emails with Log Data?

Hi There!

This is a cool script. I am making a similar email validator that currently just does basic email validation and DNS MX record checking, but not as involved.

I noticed that the results return from validate() show an associative array of emails, with the email addresses as the key and a boolean (true/false) value for whether or not the email was determined to be valid.

Using getLog() for the log data provides useful data. However, there doesn't seem to be a way to easily return the specific error for each email address or domain, which would be very useful for providing a list of invalid emails to clients, etc.

Here is a part of the script we are working on, with a basic example:

/**
 * @param string $email_address Email address to verify
 * @return mixed True on success, throws an exception with reason upon failure
 */
public function verifyEmail($email_address) {
    if (!filter_var($email_address, FILTER_VALIDATE_EMAIL)) {
        throw new \Exception('Email not vaild format');

      /** Etc, you get the idea **/

}

Is there a way to provide the specific errors for the emails/domains already? I dug in the code a bit, but did not see an apparent way.

After 1000 request

i have
Fatal error: Uncaught exception 'SMTP_Validate_Email_Exception_No_Connection' with message 'No connection' in

Loop stop

Hi! Thank for the script and apologize me for my bad english.

Its works perfect but in some mails its stuck and stops the loop

email:

[email protected]

debug:

MX records (oviedolinocesar.com): Array
(
    [oviedolinocesar.com] => 0
)

Connecting to oviedolinocesar.com:25

Connected to oviedolinocesar.com:25 successfully

<<<recv: 

No response in expect(): No response in recv

Closing socket to oviedolinocesar.com:25

and php error log:

[Sun Oct 23 11:26:18.922931 2016] [:error] [pid 2576] [client ip:65433] PHP Fatal error: Uncaught exception 'SMTP_Validate_Email_Exception_No_Connection' with message 'No connection' in /home/admin/web/XXXX/public_htm$

If you know whats happening I'll be very grateful !

My ip is clean and green light on spamhaus

If you test it and it's works fine for you, there is a way to force that mail to false and dont stop the script/loop? thx!

Validator is no longer works correctly

ive been testing your Script and the issue i have faced is in the script it self i think id dont respond correctly to hotmail emails.
array(2) { ["[email protected]"]=> bool(true) ["domains"]=> array(1) { ["hotmail.com"]=> array(2) { ["users"]=> array(1) { [0]=> string(8) "o.imejad" } ["mxs"]=> array(6) { ["hotmail-com.olc.protection.outlook.com"]=> int(2) ["mx3.hotmail.com"]=> int(5) ["mx2.hotmail.com"]=> int(5) ["mx1.hotmail.com"]=> int(5) ["mx4.hotmail.com"]=> int(5) ["hotmail.com"]=> int(0) } } } }
as Seen it respond as its true but when i send s simple email i get respond like this .
"[email protected]
Remote Server returned '550 5.5.0 Requested action not taken: mailbox unavailable.'"
how can you justify this issue . i lock forward to hear your answer.

If no MX records found

If domain dosn't exist your script fails, hangs up and kills server
line 285
there must be "if mxQuery" ($hosts, $weights) or false (no MX servers = fake domain)
you even don't have NoMX.php in your Exceptions folder ;)
it's a good script, otherwise :)

Utilizing exceptions to provide informative messages in response.

Package has a good number of granular exceptions:

use SMTPValidateEmail\Exceptions\Exception;
use SMTPValidateEmail\Exceptions\Timeout as TimeoutException;
use SMTPValidateEmail\Exceptions\NoTimeout as NoTimeoutException;
use SMTPValidateEmail\Exceptions\NoConnection as NoConnectionException;
use SMTPValidateEmail\Exceptions\UnexpectedResponse as UnexpectedResponseException;
use SMTPValidateEmail\Exceptions\NoHelo as NoHeloException;
use SMTPValidateEmail\Exceptions\NoMailFrom as NoMailFromException;
use SMTPValidateEmail\Exceptions\NoResponse as NoResponseException;
use SMTPValidateEmail\Exceptions\SendFailed as SendFailedException;

Is there a way to utilize these exceptions to include information about the exact error that occurred and providing that as part of the $results array response?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.