Code Comments
Programming Forum and web based access to our favorite programming groups.I am trying to setup an smtp server. I need a way to associate
bob@yahoo.com with yahoo's smtp server smtp.a2.yahoo.net or something.
I know that a dns server keeps an MX record to record a server for
email. I just need a way to translate @yahoo too smtp.a2.yahoo.net.
I tried using java.net.InetAddress.getByName("bob@yahoo.com")
Any other suggestions?
Post Follow-up to this messageI don't know why it shows bxb@yxahxxo.xom it should be "bob@yahoo.com"
Post Follow-up to this messageWERNOTKIN wrote:
> I am trying to setup an smtp server. I need a way to associate
> bob@yahoo.com with yahoo's smtp server smtp.a2.yahoo.net or something.
> I know that a dns server keeps an MX record to record a server for
> email. I just need a way to translate @yahoo too smtp.a2.yahoo.net.
>
As you said, you need to connect to a DNS server to get the MX record.
I found it was easier to do this by using C/C++.
--
Song
/* E-mail.c */
#define User "Yu.Song"
#define At '@'
#define Warwick "warwick.ac.uk"
int main() {
printf("Yu Song's E-mail: %s%c%s", User, At, Warwick);
return 0;}
Further Info. : http://www.dcs.warwick.ac.uk/~esubbn/
________________________________________
_______________
Post Follow-up to this messageWERNOTKIN wrote: > Any other suggestions? <http://www.dnsjava.org/>
Post Follow-up to this messageI found out how!!! JNDI!!!
DirContext ictx = new InitialDirContext(env);
Attributes attrs1 = ictx.getAttributes("host1", new String[] {"MX"});
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.