Has anyone used sun.net.smtp.SmtpClient from a servlet? Specifically, I
would like to be able to have a generic function which takes a PrintWriter
argument, which could either be the output that gets sent back to the
screen, or could be the contents of an email...
so I've done something like this:
public void doGet (....)
{
if (showing on screen)
{
out = res.getWriter ();
do_stuff (out);
}
else
{
out = new PrintWriter (res.getWriter ());
do_stuff (out);
}
}
private void do_stuff (PrintWriter out)
{
out.println ("This may appear in an email or on the screen...");
}
but this doesn't work (screen stuff appears fine, but nothing at all appears
in the email).
Any suggestions would be appreciated! Sorry if this is a bit off-topic...
Ben
___________________________________________________________________________
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