cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scherler, Thorsten" <Thorsten.Scher...@weidmueller.de>
Subject WG: Sendmail serial email
Date Mon, 02 Dec 2002 15:16:43 GMT


-----Ursprüngliche Nachricht-----
Von: Scherler, Thorsten 
Gesendet: Montag, 2. Dezember 2002 15:49
An: cocoon-users@xml.apache.org
Betreff: AW: Sendmail serial email


Hello group,

I don't know why I don't get any answers on that topic, but it is quite frustrating.

http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon-p2.html#sidebar1

There you can find how to nested a esql with sendmail.

It is working!

Now I just suffering how to attach a pdf.

...but I don't think I will get any answers on that,or?

:-(

-----Ursprüngliche Nachricht-----
Von: Scherler, Thorsten 
Gesendet: Montag, 2. Dezember 2002 13:58
An: Cocoon-Dev (E-Mail); Cocoon-Users (E-Mail)
Betreff: Sendmail serial email


Hello group,

I am still trying to send a serial email with cocoon ... and I am stucked big time

I got the sendmail logic sheet runnig (without the possiblity to attach a file or a URL).

I have my query (with esql) running.

Now I want to do the following:
The query looks for the date on which information has to be send (info.xsp:)
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">
<dataset>
<esql:connection>
<esql:pool>IDC2</esql:pool>
<esql:execute-query>
<esql:query>
select * from info where Info_datum = #<xsp-request:get-parameter name="date"/># 
<address>
<bname1>
<esql:get-string column="business_name"/>
</bname1>
<bname2>
<esql:get-string column="business_name_2"/>
</bname2>
<bname3>
<esql:get-string column="business_name_3"/>
</bname3>
<street>
<esql:get-string column="address"/>
</street>
<ZIP>
<esql:get-string column="zip_code"/>
</ZIP>
<City>
<esql:get-string column="city"/>
</City>
<country>
<esql:get-string column="country"/>
</country>
<telephone_number>
<esql:get-string column="telephone_number"/>
</telephone_number>
</address>
<aktion>
<Info_datum>
<esql:get-date column="Info_datum"/>
</Info_datum>
</aktion>
<WD>
<district>
<esql:get-string column="district"/>
</district>
<ADM>
<name>
<esql:get-string column="ADM"/>
</name>
<email>
<esql:get-string column="ADM_email"/>
</email>
</ADM>
</WD>
</client>
</esql:row-results>
</esql:results>
<esql:no-results/>
<esql:error-results/>
</esql:execute-query>
</esql:connection>
</dataset>
</xsp:page>

Now I want to send each ADM an eMail. 
I have the following sendmail.xsp. I have to replace "empfaenger" with the <email><esql:get-string
column="ADM_email"/></email> :

<?xml version="1.0" encoding="UTF-8"?>
<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">
<page>
<xsp:expr>
<xsp-request:get-parameter name="./ADM/email"/>
</xsp:expr>
<xsp:logic>   
   String empfaenger = 
   "thorsten.scherler@weidmueller.de\n";
  </xsp:logic>
<xsp:logic>
   String text =
   "\n"+
   "something\n"+
   "\n"+
   "more:\n"+
   empfaenger;
   </xsp:logic>
<xsp-request:get-parameter name="date"/>
<sendmail:send-mail>
<sendmail:charset>ISO-8859-1</sendmail:charset>
<sendmail:from>user@mydomain.com</sendmail:from>
<sendmail:to>
<xsp:expr>empfaenger</xsp:expr>
</sendmail:to>
<sendmail:cc>
<xsp:expr>empfaenger</xsp:expr>
</sendmail:cc>
<sendmail:subject>D 200203 V</sendmail:subject>
<!-- Modify the next line to point to your mail server -->
<sendmail:smtphost>mail.weidmueller.com</sendmail:smtphost>
<sendmail:body>
<xsp:expr>text</xsp:expr>
<xsp-request:get-parameter name="date"/>
</sendmail:body>
</sendmail:send-mail>
<send>ok</send>
</page>
</xsp:page>

How can I do that?

Write a xsl with Processing instruction to build the sendmail file on the fly?

I would rather like not to have to do that!

Any ideas?

> Mit freundlichem Gruss,
> 
> Thorsten Scherler
> Marketing / Telefonmarketing
> 
> Weidmüller GmbH & Co.
> P.O. Box 2807
> 33058 Paderborn
> Tel.:+ 49 - 5252-960-350
> Fax:+ 49 - 5252-960-116
> eMail: thorsten.scherler@weidmueller.de
> http://www.weidmueller.de
> 
> 

---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message