Some mail servers will only accept mail from a certain address or domain.
The DNS MX record should list where to actually send the mail for a given
domain address, but I'm not sure how to retrieve this information.  One way
around it may be to send the mail to a know SMTP server (like your ISP's)
and let it route it to it's destination.  You might want to look at the
information on relaying in the RFC 821 spec.
    (*Chris*)

----- Original Message -----
From: Rolando Salangsang <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 10, 1999 12:33 PM
Subject: e-mail


>Hello,
>
>I have an servlet that emails a confirmation message to a user after a they
>fill out a form. All seems to be working OK except for some "UnknownHost"
>Exceptions on some email addresses.
>
>I use the following sample code to obtain the host of the recipient:
>
>int indexOfAtSign = recipientAddress.indexOf('@');
>String host = recipientAddress.substring(indexOfAtSign + 1);
>
>I make a socket connection to the target as follows:
>Socket s = new Socket(host, SMTP_PORT);
>
>My questions are in regards to the recipient's email address:
>1. If I try to test mail someone at <username>@notes.seagate.com, I will
get
>an unknown host exception.
>2. Am I missing something that a commercial email client does to the
>recipient's address? I can send this same message to the same address as
>question 1. without a problem.
>
>Any tips/ideas would be appreciated
>
>Thanks
>Rolando
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to