ak************@gmail.com wrote:
I am trying to write a program that can verify an email address
without sending mail to it.
You'll have to decide what you mean by "verify", then. If it's
just syntax, pick a suitable regular expression. If the address
has to "exist", you'll have to build some kind of table of
known addresses and use something like a hash table or search
tree to see if the address you have is one of those.
These techniques are not specific to C; if you want to use them
in C you'll either have to write code for them (questions about
which are topical) or find libraries (topicality of which will
depend on how you ask and the attitudes of the responders).
any hint/clue will be quite useful to me.
Explaining the wider context of your problem will often help
us to give useful answers. Must you write this in C, or would
a shell or Ruby [1] script be OK? Is this an exercise, homework,
or real code? If C, must it be portable or need it work only
on your local system? Are you going to spam the verified addresses
or just check that users have identified themselves sensibly?
Most Recent Repeated Enlightenment: don't fight the tide. Every
programming language & framework has its own oceanography.
[1] Or Perl or Python or ...
--
"The path to the web becomes deeper and wider." - October Project
Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England