jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pete.sto...@kisstechnologies.co.uk
Subject New version of Mailer tag
Date Thu, 05 May 2005 17:26:37 GMT
Hi,
having been using the Mailer taglib for some while to send out all the 
emails from our sites and it has become obvious that there are a number of 
limitations and problems with it, specifically:

- You cannot produce a multi-part plain text and HTML email.  This means 
you can send decent mails and help them get through spam filters by 
avoiding obvious problems (eg HTML only mails).[Feature]
- Attaching files seems to conflict with Tomcat's tag pooling, so if you 
attach a file then every time the tag is run, the file is attached an 
extra time to the email, thus by say the 5th run of it, there are 5 
attachments of the same file. [Bug]
- You cannot set the filename of a file you attach to an arbitrary one. 
This means if you are attaching from a URL say with some parameters, you 
get a pretty nasty filename. [Feature]

To this end, I have written the necessary code to achieve the features and 
fix the bug.  It has meant changing MailTag, MessageTag, AttachTag and 
SendTag, as well as adding an attribute to the taglib.tld for the 
AttachTag (called filename).  The new version works exactly the same as 
before but you can now put one or two message tags within the body of the 
mail tag:

<mailer:mail server="localhost">

        <mailer:setrecipient type="to">a@b.com</mailer:setrecipient>
        <mailer:from>a@b.com</mailer:from> 
        <mailer:subject>Subject</mailer:subject> 
 
        <mailer:message type="text">

This is a test email message.

        </mailer:message>
 
        <mailer:message type="html">

<html>
<body>
<p>This is a test email message.</p>
</body>
</html>

        </mailer:message>

        <mailer:attach url="" filename="yourfile.html">
                http://localhost/getmyfiletosend.html?fileId=123
        </mailer:attach>
 
        <mailer:send/>

</mailer:mail>

What I don't know is how to contribute these features.  Anyone got any 
help here or can someone do it for me?  I guess it's really a new point 
version rather than a patch, though it is of course backwards compatible.

cheers
Pete

Kiss Technologies

http://www.kisstechnologies.co.uk/

** Please note, we have moved! **
131/132 High Holborn
London
WC1V 6PU

Phone numbers:

Phone 020 7692 9922
Fax 020 7692 9923
Out of hours
Support phone 020 7692 9933
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message