-
Notifications
You must be signed in to change notification settings - Fork 9
Class CAT_Helper_Mail
The new Mail Helper Class creates an abstraction layer between the real mailer class used and the core / modules that need to use mailing functions.
As this class works with different mailer classes, the name of the class (driver) you wish to use must be given as param to the getInstance()
method. At the moment, there are two drivers available:
- PHPMailer
- Swift
Please note that the mailer class must be installed as an addon.
Boolean sendMail( String $fromaddress, String $toaddress, String $subject, String $message, String $fromname )
This is a driver method. Sends a mail with subject $subject
to $toaddress
with mail body $message
.
$wb->mail()
encapsulates this, using PHPMailer driver.
Allows to retrieve the last error stored by setError()
.
get_page_footers()
completely replaces the old method register_frontend_modfiles_body()
.
Just add the function call directly before the closing </body>
-Tag of the template:
<html>
<head>
...more...
</head>
<body>
...
<?php get_page_footers(); ?>
</body>
</html>
Or, for Dwoo based templates:
{get_page_footers()}
For backend templates (which are always Dwoo based), use
{get_page_footers('backend')}
The function is backward compatible and automatically loads the following files of all modules used on the current page:
<Module>/frontend_body.js
In addition, every module can have a file named footers.inc.php
to define additional files.
The basics are the same as described in get_page_headers(). The file should define an array named $mod_footers
.
Of course, neither CSS files can be loaded nor META-settings can be made in the footer. But it is possible to load additional JavaScripts here.
Example:
$mod_footers = array(
'frontend' => array(
'script' => array(
array(
'alert("hello world!");'
),
),
),
);