midrange.com code scratchpad |
Name:
MMAIL XMLi Template
|
Scriptlanguage:
Plain Text
|
Tabwidth:
4
|
Date:
03/22/2011 11:10:26 pm
|
IP:
Logged
|
|
Description:
Example XMLi Template using MMAIL
|
Code:
- <xmli:template xmlns:xmli="http://www.sourceforge.net/xmli"
- xmlns:mmail="http://www.larryducie.com/mmail" ccsid="819" format="pretty" >
-
- <html>
- <body>
- <h1>Heading 1</h1>
- <xmli:value-of select="'Some text below heading 1'" />
- </body>
- </html>
-
- <!-- Simple text message -->
- <mmail:send>
- <mmail:sender name="Test For MMAIL" address="me@there.com"/>
- <mmail:subject>Hooray, it worked! Test Subject from XMLi MMAIL Extension</mmail:subject>
- <mmail:body content-type="text/html"><mmail:document/></mmail:body>
-
- <xmli:run-sql name="recipients" naming="SYS" statement="select name, address
- from someFile
- where something = somethingElse
- order by someValue, someOtherValue">
- </xmli:run-sql>
- <xmli:for-each>
- <mmail:recipient type="to" name="${recipients.1}" address="${recipients.2}"/>
- </xmli:for-each>
-
- <mmail:attach disposition="imbed" binary="true" path="/mmail/image/giovanni.jpg"/>
- <mmail:attach disposition="attach" binary="true" path="/mmail/image/paper1.gif"/>
- <mmail:attach disposition="attach" binary="true" path="/mmail/audio/cheering.wav"/>
- </mmail:send>
-
- </xmli:template>
-
-
|
|
|