emailverify / email-verify Goto Github PK
View Code? Open in Web Editor NEWNode.js email SMTP verification, powered by EmailChecker.com API
Home Page: https://emailchecker.com/real-time-api
Node.js email SMTP verification, powered by EmailChecker.com API
Home Page: https://emailchecker.com/real-time-api
I have recently installed this package but i saw this package can't verify over a lots of domain but it's always returning true if the mail provider is gmail!
That's a big issue but no one ever created a issue with this problem.
Hi
I use emails that have valid domain and library working good
But some domain not exist but library return true
Or domain exists but email not exist and again result is true
Why?
Hi bighappyworld,
Thank you for writing such a fantastic module, it's really good to help to valid email address.
However I find some strange issues when verifying email address like [email protected] or [email protected]. The script will keep loading until timeout.
I just try to verify address like [email protected], under this situation, the socket.on('data', function(data){...}) function will be called every time socket.write something. However when to verify address like [email protected] or [email protected], the socket.on('data', function(data){...}) function won't be called after socket.write("EHLO rob\n").
I was testing under local environment, I'm not sure if it's the problem.
It's so good if you can help to have a look.
Hope you have a happy 2015 ^^
On some emails if it throws an error, it returns the callback twice.
Also when it errors, the callback is in the wrong format. Should be error, info
but is info, error
.
The email verify fails because of failing error
root@ubuntu:~/testing# email-verify [email protected]
INFO: # Veryfing [email protected]
INFO: Resolving DNS... alpha.gg
INFO: MX Records {"exchange":"mx00.1and1.co.uk","priority":20}
INFO: Choosing mx00.1and1.co.uk for connection
INFO: Creating connection...
INFO: Connected
SERVER: 554-kundenserver.de (mxeue010) Nemesis ESMTP Service not available
SERVER: 554-No SMTP service
SERVER: 554 invalid DNS PTR resource record, IP=198.179.57.23
SERVER:
INFO: Closing connection
{ success: false,
info: '[email protected] is an invalid address',
addr: '[email protected]' }
I checked with other validator, they are saying that the email address is valid.
Email Hunter
I'm using this script to verify about 300k email addresses. but only output 2354 records. I'm sure there is many more valid email addresses in list.
Hello,
Can you add timeout for resolving DNS Mx records for the host name? Because verify
spend a lot of time before start validates SMTP.
For example:
https://stackoverflow.com/questions/10777657/node-js-dns-lookup-how-to-set-timeout
nodejs/node#7231
Thx, V
Hey,
Validation of all cisco.com email ids returns success always...
[email protected] returns success
What could be the reason ?
(Testing from AWS servers, I guess requests from local IPs get blocked)
Hello, some servers (mail.ru for example) always return false and error "550 SMTP is available only with SSL or TLS connection enabled."
Can you add SSL support?
Could you please add explicit license information?
Currently package.json
lists ISC as a license, which is a default option for newly initialized packages, so intention is unclear.
Is there any option for return on first success instead of waiting for all possibilities?
email-verify -d domain.com -n John Doe
Hi,
I am getting invalid address on a valid email address and error is
"perfora.net (mxeueus003) Nemesis ESMTP Service not available
No SMTP service
invalid DNS PTR resource record, IP=182.185.147.xxx"
I have tested on multiple online email verifier
https://hunter.io
https://tools.verifyemailaddress.io/
and they can successfully verified that email address.
Any idea how to fix this ?
Thanks,
Imran
Some mail servers may reject connection because of SPF records.
Having ability to set a custom sender name would be very nice.
Hi, thanks for the package. I have an issue when I want to check an email adress with the package. I use the stand alone email-verify [email protected]
version and the followng sample code:
const verifier = require('email-verify');
const infoCodes = verifier.infoCodes;
verifier.verify("[email protected]", (err, info) => {
if(err) {
console.log(err);
}
else{
console.log( "Success (T/F): " + info.success);
console.log( "Info: " + info.info );
//Info object returns a code which representing a state of validation:
//Connected to SMTP server and finished email verification
console.log(info.code === infoCodes.finishedVerification);
//Domain not found
console.log(info.code === infoCodes.domainNotFound);
//Email is not valid
console.log(info.code === infoCodes.invalidEmailStructure);
//No MX record in domain name
console.log(info.code === infoCodes.noMxRecords);
//SMTP connection timeout
console.log(info.code === infoCodes.SMTPConnectionTimeout);
//SMTP connection error
console.log(info.code === infoCodes.SMTPConnectionError)
}
})
I tested this sample code on my laptop and the website repI.it (https://repl.it/languages/nodejs) but I always have this error:
OperationalError: connect ETIMEDOUT 104.47.1.36:25 error at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) { errno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', address: '104.47.2.36', port: 25 }
why I keep getting this error and there is a way to resolve it?
I use nodeJS 12.18.2 and email-verify 0.2.1 on Ubuntu 18.04 and my network connection is Fiber To The Last Amplifier.
{ Error: connect ETIMEDOUT 66.96.140.72:25
at Object.exports._errnoException (util.js:1007:11)
at exports._exceptionWithHostPort (util.js:1030:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '66.96.140.72',
port: 25 }
any reason on why this might be happening?
root@localhost:~# email-verify [email protected]
{ success: false,
info: '[email protected] is an invalid address',
addr: '[email protected]' }
As title, 'infoCodes' were exported as 'verifyCodes'.
How to handle different SMTP Port for different domain?
For example in domain aaa.com use port 25, but in domain bbb.com port 25 is blocked so they use port 465 instead (for example).
Domain ccc.com might use some other port.
So the list can be endless.
What is the current status of this project, and is anyone maintaining it?
Thanks for your awesome library, I have experienced that emails on some domains like adobe.com
always returns valid no matter what. Do you have any idea how to work on that? At least, return back, with this domain, we cannot do verification. It would be great to have this functionality, you can try on http://www.mailtester.com/ with any emails on adobe.com
. mailtester
will return the following:
Mail servers found for domain:
- adobe.mail.protection.outlook.com (priority 2, ip address: 207.46.163.215)
- adobe-com.mail.protection.outlook.com (priority 1, ip address: 207.46.163.170)
Using mail server with lowest priority number:- adobe-com.mail.protection.outlook.com (priority 1, ip address: 207.46.163.215)
Mailserver identification:
BL2FFO11FD023.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Fri, 13 Nov 2015 01:10:56 +0000
Server doesn't allow e-mail address verification
Using the module to verify that @me.com and @icloud.com are valid always returns false.
I have had allt of problems getting my account verified so that part im not fond of.
I have found that email addresses which have an automatic reply set up on them (e.g. 'I am currently on leave until the DD/MON/YYYY, please contact [email protected] if you have an urgent request.') are being marked as invalid when they are not invalid, just temporarily out of use. Is there a way around this?
Cheers,
AsusVentura
I need to check and verify many emails, and i think my ip address will be treated as spam. Therefore, I would like to connect through proxy servers. Is it possible to connect through proxy servers?
Could you give me a clue?
I'm at a loss trying to figure out how to use. I can't get Comcast or using a remote server like Heroku to make connections with email providers. I read somewhere that Amazon EC2 works for send email. The idea is that spammers are taking over personal computers and the major ISPs are preventing connections on port 25 to combat it.
For the same email, I get the exact same info object and same verifyCodes, but one passes and one fails. How come? For example, the code is
verifier.verify(email, options, function(err, info) {
if (err) {
console.log("smtp valid err ", err);
} else {
console.log("Success isSmtpCatchAll (T/F): " + info.success);
console.log("Info: " + info.info);
//Info object returns a code which representing a state of validation:
//Connected to SMTP server and finished email verification
console.log(info.code === verifyCodes.finishedVerification);
// //Domain not found
console.log(info.code === verifyCodes.domainNotFound);
// //Email is not valid
console.log(info.code === verifyCodes.invalidEmailStructure);
// //No MX record in domain name
console.log(info.code === verifyCodes.noMxRecords);
// //SMTP connection timeout
console.log(info.code === verifyCodes.SMTPConnectionTimeout);
// //SMTP connection error
console.log(info.code === verifyCodes.SMTPConnectionError);
}
});
But on one machine, the result is
Success Smtp Valid (T/F): true
Info: [email protected] is a valid address
addr: [email protected]
code: 1
banner: 220 se6.mailspamprotection.com ESMTP Exim 134224 Fri, 15 Jun 2018 14:23:04 -0500
true
false
false
false
false
false
And on another, the result is
Success Smtp Valid (T/F): false
Info: [email protected] is a invalid address
addr: [email protected]
code: 1
banner: 220 se2.mailspamprotection.com ESMTP Exim 134224 Fri, 15 Jun 2018 14:22:35 -0500
true
false
false
false
false
false
Any ideas? It's almost the exact same result, even the banner, except one is valid and the other invalid.
Any idea why my requests always time out?
[Error: queryMx ETIMEOUT] code: 'ETIMEOUT', errno: 'ETIMEOUT', syscall: 'queryMx'
Hi,
Thanks for this module!
I just wanted to inform you that valid email addresses don't return info.success = true when I run several verifications in a short time period.
After googling, I saw this SO post:http://stackoverflow.com/questions/21181843/why-is-dns-resolvemx-always-returning-an-error-when-called-many-times
I was wondering if you see this issue and whether we can add a server rotation option for everyone's benefit.
Here is my code:
test2: function (req, res) {
var options = {
port : 25, // integer, port to connect with defaults to 25
sender : '[email protected]', // email, sender address, defaults to [email protected]
timeout : 0, // integer, socket timeout defaults to 0 which is no timeout
fdqn : 'gmail.com' //, used as part of the HELO, defaults to mail.example.org
};
var checkEmail = require('email-verify');
checkEmail.verify('[email protected]', options, function(err, info) {
console.log(info);
});
checkEmail.verify('[email protected]', options, function(err, info) {
console.log(info);
});
res.json(true);
}
This is what is returned:
{ [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
{ [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
var verifier = require('email-verify');
verifier.verify( '[email protected]', function( err, info ){
if( err ) console.log(err);
else{
console.log( "Success (T/F): " + info.success );
console.log( "Info: " + info.info );
}
});
Email address is valid but is shows invalid email address. I have tried to use port in options with 465 and 587 which didn't work.
In online tool it shows
true
"Success (T/F): false"
"Info: [email protected] is an invalid address"
Note: Email address is correct. I have tried other addresses too.
I'm encountering two issues.
-c
concurrency flag, I get an error related to it being undefined
.timrpeterson$ email-verify [email protected]
Unhandled rejection TypeError: 'concurrency' must be a number but it is [object Undefined]
at map (/usr/local/lib/node_modules/email-verify/node_modules/bluebird/js/release/map.js:140:21)
at Function.Promise.map (/usr/local/lib/node_modules/email-verify/node_modules/bluebird/js/release/map.js:160:12)
at Object.<anonymous> (/usr/local/lib/node_modules/email-verify/app.js:112:11)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
timrpeterson$ email-verify [email protected] -c 1
(never any output)
Thoughts?
Hi,
I was testing your library and unfortunately, our production AWS server got blacklisted by Microsoft ([email protected]
it's mine)
ubuntu@ip-172-31-66-205:~$ email-verify [email protected]
INFO: DEBUG
INFO: OPTIONS: {"port":25,"sender":"[email protected]","fqdn":"mail.example.org","concurrency":1,"debug":true}
INFO: # Veryfing [email protected]
INFO: Resolving DNS... hotmail.it
INFO: MX Records {"exchange":"eur.olc.protection.outlook.com","priority":10}
INFO: Choosing eur.olc.protection.outlook.com for connection
INFO: Creating connection...
INFO: Connected
SERVER: 220 DB3EUR04FT014.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Wed, 5 Aug 2020 14:03:14 +0000
SERVER:
CLIENT: EHLO mail.example.org
CLIENT:
SERVER: 250-DB3EUR04FT014.mail.protection.outlook.com Hello [35.181.159.81]
SERVER: 250-SIZE 49283072
SERVER: 250-PIPELINING
SERVER: 250-DSN
SERVER: 250-ENHANCEDSTATUSCODES
SERVER: 250-8BITMIME
SERVER: 250-BINARYMIME
SERVER: 250-CHUNKING
SERVER: 250 SMTPUTF8
SERVER:
CLIENT: MAIL FROM:<[email protected]>
CLIENT:
SERVER: 550 5.7.1 Unfortunately, messages from [<OUR_IP>] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [DB3EUR04FT014.eop-eur04.prod.protection.outlook.com]
SERVER:
INFO: Closing connection
{
success: false,
info: '[email protected] is an invalid address',
addr: '[email protected]',
code: 1,
tryagain: false,
banner: '220 DB3EUR04FT014.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Wed, 5 Aug 2020 14:03:14 +0000\r\n'
}
In this case, it's wrong saying that [email protected] is an invalid address
since when I try it locally it's perfectly valid. Maybe it could really help to parse the server's message or just blindly reporting it, even if it's a bit long. I had to enable the debugging option by modifying the module inside node_modules
(I wasn't able to find a param for the CLI to enable debugging) to spot this message.
Thanks.
Hi guys,
I love the idea of the this package and am just trying it out. It works when testing it with my own mail-server (which does NOT have any spam protection), BUT it seems like on other domains I am getting a lot of false negatives due to blacklisting...
Is there a trick to make this work better? Maybe use a valid options.sender
and options.fqdn
?
Examples of "blacklisted" results I am getting:
// GMX
SERVER: 554-gmx.net (mxgmx016) Nemesis ESMTP Service not available
SERVER: 554-No SMTP service
SERVER: 554-IP address is black listed.
// RANDOM TARGET
SERVER: 451 4.3.0 Message temporarily deferred. Please try again later
Is there any way to check Catch All emails
Hi Team,
Can this plugin be used for frontend development like AngularJS?
I tried installing and got many warnings. Not sure if relevant but just wanted to comment here. I'm using Node v0.12.8.
Tims-MacBook-Pro-retina:~ timrpeterson$ sudo npm install -g email-verify
/usr/local/bin/email-verify -> /usr/local/lib/node_modules/email-verify/app.js
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npmconf requires semver@'2' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/semver,
npm WARN unmet dependency which is version 5.0.3
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npmconf requires uid-number@'0.0.5' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/uid-number,
npm WARN unmet dependency which is version 0.0.6
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data requires github-url-from-username-repo@'^0.2.0' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/github-url-from-username-repo,
npm WARN unmet dependency which is version 1.0.2
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data requires semver@'2 || 3' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/semver,
npm WARN unmet dependency which is version 5.0.3
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk requires assert-plus@'>=0.2.0 <0.3.0' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus,
npm WARN unmet dependency which is version 0.1.5
IMHO, it would be great to follow coding guidelines in order to improve the implementation and make the code easier and pleasant to read.
OperationalError: queryMx ECONNREFUSED gmail.com
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19) {
cause: Error: queryMx ECONNREFUSED gmail.com
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'queryMx',
hostname: 'gmail.com'
},
isOperational: true,
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'queryMx',
hostname: 'gmail.com'
}
I tried to verify my yahoo account. It comes back as success: false. It is my yahoo address so I know it's valid and gets email daily.
Thoughts?
Hi, Thanks for the great package, but I keep gettiing "SMTP connection error" when I verify bulk emails. Why is this error caused and is there any way to resolve it?
Thanks.
Hi. I'm trying to validate a test email which actually exists, but dns.resolveMx
appears in the console as an error. How can I fix this one? I'm using Meteor
While for production usage port 25 is always the best idea, it may bring troubles during the local development. A lot of ISPs are blocking outgoing connections to port 25.
Having an ability to change port to 587 (which is supported by a lot of mail servers) may allow a lot of developers to test how this component works locally.
is there a way to send an email with customized body specified in, ie html?
Currently success: true
is a definitive answer that SMTP server acknowledges that it would receive email to a given address.
success: false
could mean both rejection of a RCPT TO
command and misconfiguration on client side, e.g. 554-Bad DNS PTR resource record.
So success: false
could give false negatives due to client misconfiguration.
It would be convenient to differentiate mailbox existence and middle step success flags. For example { exists: true|false|undefined, failed: 'CONNECT|EHLO|MAIL FROM|RCPT TO' }
with exists set to boolean only when response is definitive.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.