Name server queries with c or c++

Where I can find examples how to program name server queries? I'm writing smtp client, which will accept internet addresess like somebody@company.com. I need to query mail server for company.com. I can do this by executing nslookup and piping result to file, but I'm looking more sophisticated solution. Any suggestions?

kettuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
feenixCommented:
First, why do you want to send the email directly to the recipient's email server? Wouldn't it be easier to just send the email to your ISP's SMTP server?

0
 
ntdragonCommented:
i didn't understand exectlly what do you want but check c++builder there is everything you need for making an e-mail server<and you can check the help>
0
 
jhanceCommented:
Grab a copy of any linux distribution that includes its source code.  The nslookup utility as well as sendmail both have working examples of this.
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.