@@ -17,12 +17,6 @@ It also supports Templates in various languages, which can be managed in the bac
Additionally sg_mail provides a finisher class for the [Formhandler](https://typo3.org/extensions/repository/view/formhandler) extension, making it possible to manage its templates in the backend.
## The Backend Module
After a successful Installation, you have a new module in the "WEB" section of your TYPO3 Backend.
Clicking on it loads the administration panel. Here you can create, update, delete and test your E-Mail templates.
## Usage
### Registering your Extension
...
...
@@ -53,8 +47,6 @@ Basic Usage:
2. Set all desired fields (i.e. setLanguage, setToAddresses, setTemplateName, setExtensionKey etc.)
3. Invoke the **sendEmail()** function
### The mail queue
The mail queue holds all the mails that have been sent or should be sent in the future. You can view the mail queue in the backend module and interact with the entries.
...
...
@@ -103,6 +95,37 @@ finishers {
}
```
## The Backend Module
With this extension comes a new module in the "WEB" section of your TYPO3 Backend.
Clicking on it loads the administration panel for all your mail templates and the mailing queue.
The module provides two modes:
In the **Template Editor** mode you see an overview of all the template markers for the selected template. Here you can edit & reset your templates in all the languages of your TYPO3 instance. Additionally you can test your mails by entering an email address and clicking **Send Test Mail**.
With the **Mail Queue** mode, you can see the current content of your mailing queue. For each queue entry you have the following options:
<img height="20px" width="20px" src="https://camo.githubusercontent.com/ee057cb37045beeccf8078f74e65e1774ec5e001/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f616374696f6e732f616374696f6e732d646f63756d656e742d696e666f2e737667"> Show further information
<br>
<img height="20px" width="20px" src="https://camo.githubusercontent.com/91c383d7beded93dbe6a62e2a1ae94bf82d1d783/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f616374696f6e732f616374696f6e732d646f63756d656e742d686973746f72792d6f70656e2e737667"> Show history
<br>
.... Expand/Collapse the options menu
<br>
<img height="20px" width="20px" src="https://camo.githubusercontent.com/53fd52618f310e4c31cca5a57df3b314bd0a7a9c/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f616374696f6e732f616374696f6e732d696e736572742d7265666572656e63652e737667"> Send the mail again (if already sent)
<br>
<img height="20px" width="20px" src="https://camo.githubusercontent.com/53fd52618f310e4c31cca5a57df3b314bd0a7a9c/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f616374696f6e732f616374696f6e732d696e736572742d7265666572656e63652e737667"> Send this mail (if not already sent)
<br>
<img height="20px" width="20px" src="https://camo.githubusercontent.com/4b1188209e740e17a4ec0cd6583425696809017b/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f616374696f6e732f616374696f6e732d646f63756d656e742d766965772e737667"> View the content of this mail
## Developer Guide
### Service Classes
...
...
@@ -111,7 +134,7 @@ To register your extension you need at least one implementation of this interfac
Inside the **init()** function of your Implementation you should define variables for the following purposes:
######Template Key
A unique Identifier for this particular template. It should be obvious from the template key for what purpose this template is intented.
A unique Identifier for this particular template. It should be obvious from the template key for what purpose this template is intended.
######Extension Key
The extension key of the TYPO3 extension registering with sg_mail. This should be the same for all of your extensions!
...
...
@@ -143,7 +166,7 @@ Each Array element should be its own array and structured like this:
marker = the variable name you use in the template
type = the date type of the variable
value = an example value, visible in the backend to the editors
description = a brief description for what this variable is intented for
description = a brief description for what this variable is intended for
Finally you have to call the function **\SGalinski\SgMail\Service\MailTemplateService::registerTemplate** (this is only marked deprecated for public use)
inside your **register()** function and pass all the necessary values.
...
...
@@ -156,7 +179,7 @@ Now you can register the class in your **ext_localconf.php** with
You find a complete example of this process in the file **SGalinski\SgMail\Example\Register**
#### MailTemplateService
This class provides you with an API to the mailing functionalitiy and various helper functions regarding the your templates.
This class provides you with an API to the mailing functionality and various helper functions regarding the your templates.
Here is an overview of some important functions:
...
...
@@ -168,7 +191,7 @@ Registers a template by providing a complete class name of your **RegisterInterf
Needs to be called from within your **ext_localconf.php**.
######function getDefaultTemplateMarker
Reads custom example template marker fom your **locallang.xlf**. This is only useful if you need multi language examples in your Backend Marker
Reads custom example template marker from your **locallang.xlf**. This is only useful if you need multi language examples in your Backend Marker
######function getRegisterArray
Returns an array of all registered templates, with each element in the following format:
...
...
@@ -228,7 +251,7 @@ This extension uses two database tables:
- tx_sgmail_domain_model_mail
This table holds all the mails in the mailing queue. When they are sent, the flag **sent** is set to true and the **sending_time** is inserted. You can inspect the mailing queue with the backend module.
If amail should ignore the mail queue, it is still inserted in this table with the **sent** flag set to true.
If an email should ignore the mail queue, it is still inserted in this table with the **sent** flag set to true.
The extbase model classes for these tables are located at the *Domain\Model* folder.