How to send emails in a cronjob script with valid links ?

Author Message

Patrick ALLAERT

Friday 15 July 2005 10:43:49 am

I am creating a very simple cronjob that do something like:

$tpl =& templateInit();

$tpl->setVariable( "products", $productList );

$templateResult =& $tpl->fetch( 'design/plain/templates/emailOfProducts.tpl' );

...

And the content of $templateResult is sent by mail...

Everything is working fine, except that my links does not contain the HOST:

<a href="/plain/content/view/full/307">ProductA</a>
<a href="/plain/content/view/full/308">ProductB</a>

Each lines are generated by the following scripts:

{section loop=$products}
{content_view_gui content_object=fetch( 'content', 'object', hash( 'object_id', $item ) ) view=text_linked}
{/section}

The template used is the default one containing a |ezurl. I just want my script includes a specified HOST (retrieved from ini files, set by hand, i don't care !)

Does someone have a idea ?

Thanks in advance

Patrick ALLAERT
http://www.dixite.com/
http://users.pandora.be/patrick_allaert/

Ekkehard Dörre

Tuesday 30 August 2005 3:55:49 am

{let host=ezini("SiteSettings","SiteURL")}
<a href="{concat('http://',$host,'/lalala/')}">lululu</a>
{/let}

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.