[TYPO3-english] How to mail a BE module content
Jigal van Hemert
jigal.van.hemert at typo3.org
Wed Mar 28 21:53:52 CEST 2012
Hi,
On 28-3-2012 17:22, Gregory Loichot wrote:
> I'm using last TYPO3 4.5 and I have a BE module (home made) that
> displays a "report" (some stats design in simple HTML tables). That is ok.
>
> Now, what I want to do is : every day, at 0h, send an email to some
> people containing the statistics displayed by my BE module.
Create a Scheduler task (see the sample tasks in
typo3/sysext/scheduler/examples/ ), register it as a scheduler task (
see typo3/sysext/scheduler/ext_localconf.php for how to add them to
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'].. )
In your task you can call the routines from your module which create the
"report".
In the testtask (in the examples directory) you can also see how to send
a mail with t3lib_mail_message.
Once you've created the Scheduler task you can use the Scheduler to send
the report at whatever moment you want. As you can see in the examples
you can also add extra configuration fields to the task (for example the
mail addresses to send the report to).
--
Jigal van Hemert
TYPO3 v4 Core Team member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list