[XSL-LIST Mailing List Archive Home]
Re: [xsl] Multi part mime message in XSLT
Subject: Re: [xsl] Multi part mime message in XSLT|
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 4 Jun 2008 22:34:40 +0530
I am a little confused about the requirement. Do you want to send
email from the XSLT stylesheet?
It seems to me, you have some output from your stylesheet which you
need to email to some address.
To send an email from any environment, you need to send some specific
SMTP commands to a SMTP host to a service listening to port 25. You
cannot do this natively from the XSLT stylesheet, as in XSLT there is
no mechanism (an instruction, or an API) to communicate to hosts via
TCP/IP protocol. You can do this via say Java extension functions.
Constructing a MIME multipart message by hand could be cumbersome, if
for example there are attachments. You would need to understand the
MIME format very well to send all kind of emails correctly.
You can take an easy route by using Java mail API, if you are working
in a Java environment. You can invoke Java mail functions from the
stylesheet as extension functions.
On 6/4/08, Senthilkumaravelan K <skumaravelan@xxxxxxxxxxxxxx> wrote:
> Hi ,
> Need to create a Multipart mime message to send a email from the system.
> Am working on application,which takes xml and transforms into two
> separate stylesheet , one to produce text and html output
> from there am constructing mime message using Java.
> I need help here to convert my output as mime message so that I can
> write to socket to generate email .