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.

eZ debug

Timing: Jan 18 2025 16:11:33
Script start
Timing: Jan 18 2025 16:11:33
Module start 'layout'
Timing: Jan 18 2025 16:11:33
Module start 'content'
Timing: Jan 18 2025 16:11:34
Module end 'content'
Timing: Jan 18 2025 16:11:34
Script end

Main resources:

Total runtime0.7709 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.2734152.6563
Module start 'layout' 0.00560.0033 741.929739.5078
Module start 'content' 0.00890.7605 781.4375527.1250
Module end 'content' 0.76940.0015 1,308.562512.0938
Script end 0.7708  1,320.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4336160.0002
Check MTime0.00130.1686160.0001
Mysql Total
Database connection0.00080.101810.0008
Mysqli_queries0.728294.4686540.0135
Looping result0.00040.0552520.0000
Template Total0.735895.520.3679
Template load0.00200.261420.0010
Template processing0.733895.191620.3669
Template load and register function0.00020.019610.0002
states
state_id_array0.00150.188910.0015
state_identifier_array0.00300.387120.0015
Override
Cache load0.00170.2182170.0001
Sytem overhead
Fetch class attribute can translate value0.00050.060420.0002
Fetch class attribute name0.00100.125430.0003
XML
Image XML parsing0.00050.066420.0003
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00080.1079160.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs