jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vianen, Jeroen van" <jeroen.van.via...@satama.com>
Subject RE: New version of Mailer tag
Date Fri, 06 May 2005 21:22:44 GMT
Hi Pete,

Have you tried the mailer2 taglib that's in the sandbox?

http://jakarta.apache.org/taglibs/sandbox/doc/mailer2-doc/intro.html

It might have solved all your problems already. Please let me know.

It does require a JSP 2.0 container like Tomcat 5.5.x or Resin 3.x.

Regards,


Jeroen

-----Original Message-----
From: pete.storey@kisstechnologies.co.uk
[mailto:pete.storey@kisstechnologies.co.uk] 
Sent: donderdag 5 mei 2005 19:27
To: taglibs-dev@jakarta.apache.org
Subject: New version of Mailer tag

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

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message