In looking through the api docs, I am hoping that this is a simple coding
error. Would anyone have any thoughts on this snippet of code designed to
send a simple email using the MailMessage class. I don't return an
exception, but then again I never receive the email. I am sending it through
a remote mail gateway. I define the host in the descriptor.

            // create turbine email
             MailMessage mail = new MailMessage();
             // set mail properties
             mail.setHost(config.getAttribute("host"));
             //mail.setDebug(config.getAttribute("debug"));
             //mail.setHeaders("");

mail.setFrom(request.getSession().getUser().getGivenName()+"@localhost");
             mail.setTo(request.getParameter("To"));
             // check if Cc: is null
             if (request.getParameter("Cc") != null) {
                mail.setCc(request.getParameter("Cc"));
             }
             mail.setSubject(request.getParameter("Subject"));
             mail.setBody(request.getParameter("Message"));
             // send mail and verify result
             boolean result = mail.send();

Thanks for any thoughts:)

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to