C
C
CrazyOne2013-05-22 16:31:06
Node.js
CrazyOne, 2013-05-22 16:31:06

Need to check if the email exists

Hi everybody!

The task is to check whether the email exists in real life. The email that we will check: [email protected]

If we worked in the console, then the task is elementary:

$ telnet gmail-smtp-in.l.google.com 25
then Google asks us to enter "HELO" and we can work
$mail from:<[email protected]>
$ rcpt to:<[email protected]>

and business then ... But what about the node? I make the first request:

var exec = require('child_process').exec;
exec("telnet gmail-smtp-in.l.google.com 25",
	{timeout: 1000},
	function(error, stdout, stderr){
		console.log('stdout: ' + stdout);
		console.log('stderr: ' + stderr);
		console.log('exec error: ' + error);
	}
);

and I don’t know how to continue ... help someone who has come across.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
C
CrazyOne, 2013-05-26
@CrazyOne

I had to write a script in python and run it through the console.

E
EugeneOZ, 2013-05-22
@EugeneOZ

some services (like rambler) respond with an error even if the mailbox exists.
Why do you need this check? Sending 1 letter is not that expensive. There is no way to check if an email is valid and belongs to a user other than by sending a verification email.

N
nochkin, 2013-05-22
@nochkin

Many systems no longer answer whether there is such an address or not. They just say that the message is accepted and that's it, even if there is no such box.
You just need to send a test email and see if it was an aftershock.

1
1x1, 2013-05-22
@1x1

net.connect() with the binding you need.

N
Nikolai Turnaviotov, 2013-05-22
@foxmuldercp

Some anti-spam systems may also require “call back later”, i.e. issue a message stating that delivery is not possible at the moment, a normal server will try to deliver the letter again after the pre-configured timeout expires, spammers are often cut off.
Another option is that the system will look at the fact that you are a host without a reverse hostname and belong to the provider's dhcp pool of ip addresses and will also beat you off.
The method above with a letter of verification by the standard means of the system is the most optimal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question