sendmail.xsl - how do I format email messages?

2003-01-03 Thread Ryan Heise
Hi

I'm trying to use sendmail.xsl to create a text email formatted with
newlines, but somewhere along the line (I'm not sure where), these
newlines are being stripped.

I'm simply doing:

sendmail:body
First line.
Second line.
/sendmail:body

and the result is: First line. Second line.

Does anyone know how to fix this?

Thanks for any assistance,

Ryan

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: sendmail.xsl - how do I format email messages?

2003-01-03 Thread Frank Ridderbusch
On Sat, 4 Jan 2003 01:36:35 +1100
Ryan Heise [EMAIL PROTECTED] wrote:
.
 sendmail:body
 First line.
 Second line.
 /sendmail:body
 
 and the result is: First line. Second line.
 
 Does anyone know how to fix this?

Well, this behaviour is due to the way the sendmail logicsheet works.
Look at 

src/java/org/apache/cocoon/components/language/markup/xsp/java/sendmail
.xsl

and I think, you' ll understand. Here is, what I've done and it worked
for me.

?xml version=1.0 encoding=ISO-8859-1?
xsp:page language=java
  xmlns:xsp=http://apache.org/xsp;
  xmlns:xsp-request=http://apache.org/xsp/request/2.0;
  xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0;
  email
xsp:logic
...
  StringBuffer body = new StringBuffer();
  body.append(bla bla : );
  body.append(name); body.append(\n);
...
/xsp:logic
sendmail:send-mail
  sendmail:charsetISO-8859-1/sendmail:charset
  sendmail:from.../sendmail:from
  sendmail:to../sendmail:to
  sendmail:ccxsp:exprcc_address/xsp:expr/sendmail:cc
  sendmail:subject./sendmail:subject
  !-- Modify the next line to point to your mail server --
  sendmail:smtphostlocalhost/sendmail:smtphost

 sendmail:bodyxsp:exprbody.toString()/xsp:expr/sendmail:body
   /sendmail:send-mail  /email
/xsp:page

-- 
MfG/Regards

Frank Ridderbusch

Since I have taken all the Gates out of my computer, it finally works!!



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]