How do I get a MX Server name ...

Everything else that doesn't fall into one of the other PB categories.
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

How do I get a MX Server name ...

Post by Christian »

... from a mailadress?

Hi!

My problem is following: I want to code a form that I want to include into my program. A user who uses my software should be able to send a mail to me with this form. I already started coding something and with some code snippets of the CodeArchiv I also get successful with sending a mail. But in my tests I already knew the MX-Server (Mail Exchange Server/SMTP-Server) of the mailadress I send the mail with. As you can imagine is there a problem if I give my program away: The MX-Server of every user will be a different and I need a method with which I can determine the MX-Server of a specific maildomain.

So for example: Mr. Testguy got y software and want to send me a mail. He fills in all fields of the form - including one field for his mailadress. Know I can get the domain of the adress. (so e.g. mail@domain.de -> "domain.de") And with this information I want to determine the MX-Server of this domain.

But how can I do this? Does anybody know? If so it would be nice if that person could share this knowledge with me. :)

thank you,
Christian
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

The MX record is not used to send mail, it is for receiving mail for that domain.

you need the SMTP server from the persons ISP to send mail.
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

So MX-Server and SMTP Server are not the same things? I thought so. Could you explane the difference to me?

OK ... so please replace all "MX" I used in my first posting with "SMTP". :)

regards,
Christian
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

can you get away with doing:

Code: Select all

RunProgram("mailto:somebody@somewhere.xxx?subject=Trallalla")
:?:
it will use the clients standard mail-setup...

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

No that isn't the thing I want. Because with that I would use the standard mail client. I really want to have a form inside my program. But thank you.

regards,
Christian
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

First you will have to find the customers default mail client...
And than you wil have to find the smtp server in the clients mail program settings....

It's easy, only a dozen email clients out there :)
Outlook
Outlook Express
Eudora
Pegasus
The Bat
...
And if the client is using Outlook with Exchange server, there is no SMTP server data in the registry on his local machine...

This is the way most new virusses with build in SMTP sender do it, they use the SMTP settings from outlook (or outlook express), so they dont work on systems that dont have outlook configured.
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

Berikco wrote: And if the client is using Outlook with Exchange server, there is no SMTP server data in the registry on his local machine...

This is the way most new virusses with build in SMTP sender do it, they use the SMTP settings from outlook (or outlook express), so they dont work on systems that dont have outlook configured.
But that would be a problem. I really want that every user can use the form than. Apart from that: Is it legal to read this information from other programs?

regards,
Christian
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

cant you just use your own smpt-server? If we say i have mine as smtp.com, just connect and send mail. Some smtp uses passwords and users, but some are free too.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

There isn't much way to just find an SMTP server that the user connects to. I could literally be anything in the world!

Prompt for that information and save it somewhere for later use - it's what I do and it's the only effective way to do it if you don't want to send email using the client's standard email client..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

@thefool:
The problem with that is: In the case I have to change the server for some reason the contact form becomes useless. Another problem with that is the return adress.

@Karbon:
So you mean to collect information about all providers and their mailservers? So you don't think there is a way to get the SMTP-server from the mailadress?

regards,
Christian
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

what about you have a file on the internet somewhere. on your server, maybe. The client program downloads the file, and then the file holds the smtp server adress. That way you can change it easly. It requires a server, though.

Or what about setting up your own smtp-server? While im at the server stuff, why not just make a client and a server app. the client sends a message to your server, and you view it when you come home.
Last edited by thefool on Mon Apr 12, 2004 2:16 pm, edited 1 time in total.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Christian wrote: So you mean to collect information about all providers and their mailservers? So you don't think there is a way to get the SMTP-server from the mailadress?
Christian
my email adress has nothing to do with my smtp server. Only my pop3. You cant get the smtp from a mailadress.
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

@thefool:
The file stuff could be a opportunity. I'll think about that ... :)
my email adress has nothing to do with my smtp server. Only my pop3. You cant get the smtp from a mailadress.
While I did my research I found this: http://mailserver.aplerbeck.net/#auskunft
I think it shows that it is possible. Just type a mailadress in the field.

regards,
Christian
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

it gets my pop3 not my smtp.
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

thefool wrote:it gets my pop3 not my smtp.
Oops .. :oops:
Post Reply