You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Bjørn Bouet Smith <bb...@bsw.dk> on 2002/01/14 21:21:34 UTC

Mailer taglib

Hi there,

Im trying to programatically set the server name of the mail tag. I cant get
it to work,
Shouldn't there be a setServer tag, and how about a setTo tag.

Perhaps its me thats dumb, but I cant set the value of the attributes server
and to, if they arent in a tag. attributes should either be in a tag, or be
settable in an xsl style syntax, ie.

<mt:attribute name="server">mail.bsw.dk</mt:attribute>

Perhaps this already are possible, and If so, please dont hesitate to BONK
me on the head, and point me in the right direction.

What I am trying to do is to load an email from a database, where the
following fields are dynamic:

server
reciptient
content
subject

My code is like this. The fields from the database works fine.

<mt:mail server="<%=System.getProperty("mail.smtp.host")%>">
<mt:setrecipient type="to" address="<sql:getColumn position="1"/>"/>
<mt:subject><%=pageContext.getAttribute("subject",1)%></mt:subject>
<mt:from><%=pageContext.getAttribute("from",1)%></mt:from>
<mt:message type="html"><sql:getColumn position="3"/></mt:message>
<mt:send/>
</mt:mail>


I hope you guys can help. Otherwise I would be forced to Hack the taglib :)
and possible submit my patch *ARGH*


Best regards

Bjørn Bouet Smith
BSW




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>