hi,
I have written a servlet that takes input from a form and reformats it
then sends it as an email. It works fine when I statically use the
method to(String to) method from the MailMessage class. for example
msg.to("[EMAIL PROTECTED]");
it also works fine if i send the email to two different addresses, as
long as i hardcode the address.
However, whenever I try to read a text file with multiple addresses into
a vector, then cast the vector elements into strings, I get this error:
Unexpected reply to command: RCPT TO: : 503 Need MAIL before RCPT.
MailMessage msg = new MailMessage(mailhost);
while(prt.hasMoreElements())
{
msg.to((String)prt.nextElement());
}
Can anyone who help me?
thank you
alan
___________________________________________________________________________
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