util:sendMail works fine for me. Did you set your mail.smtp.host property?

e.g.

<%@ taglib uri="utiltags" prefix="util" %>
<%@ page language="java" import="java.util.*, javax.mail.*,
javax.mail.internet.*" %>
<%
        String smtpHost = "x.x.x.x" ;                                   // your 
servers IP
        String date = new Date().toLocaleString();
%>

<!--    Send email(s)                   -->
<%
        Properties properties = System.getProperties();
        properties.put("mail.smtp.host", smtpHost);
        Session mailSession = Session.getDefaultInstance(properties, null);
%>
<!--
        REM: above should _not_ use getDefaultInstance, only quick fix; better put
instance into JNDI,
                or create new tag that takes instance directly
-->
<util:sendMail from="vipeWebApplication" to=" [EMAIL PROTECTED] "
subject="Enquete">
date:                   <%= date %>
user:                   <%= request.getRemoteUser() %>
</util:sendMail>

Cheers

        --peter

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Harrie van
Barneveld
Sent: Wednesday, May 30, 2001 4:00 AM
To: Orion-Interest
Subject: Util taglibrary bug? util:sendMail

I'm trying to use sendMail-tag from the Orion Utiltags library and I am
having no success, anyone who has solved this problem?

If I use the "subject"-attribute, like this:
        <util:sendMail to="[EMAIL PROTECTED]" subject="Enquete">

I get the compile-time error:
Error parsing JSP page /vipe/main.jsp line 280
        subject is not a valid attribute for tag util:sendMail


If I leave the "subject" out, like this:
        <util:sendMail to="[EMAIL PROTECTED]">

I get the compile-time error:
        Error parsing JSP page /vipe/main.jsp line 280
        Property to not found in bean/tag
        com.evermind.taglib.util.IfInRoleTag

which seems way out-of-line.....
Any help is appreciated.

Harrie



Reply via email to