How to find the email server for an email address

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ellismatt
Forum Newbie
Posts: 1
Joined: Mon Sep 01, 2003 12:20 pm

How to find the email server for an email address

Post by ellismatt »

I'm stuck!
I need a script which can take an email address and find the pop server and appropriate port for it.

So far I've tried splitting the email to get the domain then using getmxrr(), but fsockopen() rarely works with the addresses this returns.

any ideas?
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

well first off you don't need to wonder about the port. it's standardized in an rfc. um..... damn. i can't remember.. it's 20-25 inclusive.

ummm... 21 is ftp i think (control) 22 is telnet... ummm 23 maybe?25 is something too... i used to know 23 and 25, i sdon't know if 24 and 20 aren't anything

rfcs on this... 821,822,2045,2046,2047,2048,2049,974,976
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

ook. i tried stmp and ftp.
both got: Not a Number
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

ok. try by number....
20-ftp data
21-ftp control
22-ssh
23-telnet
24-BO2k
25-smtp
Post Reply