forked from aimeos/ai-typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Typo3.php
64 lines (53 loc) · 1.23 KB
/
Typo3.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Metaways Infosystems GmbH, 2013
* @copyright Aimeos (aimeos.org), 2014
* @package MW
* @subpackage Mail
*/
/**
* TYPO3 implementation for creating and sending e-mails.
*
* @package MW
* @subpackage Mail
*/
class MW_Mail_Typo3 implements MW_Mail_Interface
{
private $_object;
/**
* Initializes the instance of the class.
*
* @param TYPO3\CMS\Core\Mail\MailMessage $object TYPO3 mail object
*/
public function __construct( TYPO3\CMS\Core\Mail\MailMessage $object )
{
$this->_object = $object;
}
/**
* Creates a new e-mail message object.
*
* @param string $charset Default charset of the message
* @return MW_Mail_Message_Interface E-mail message object
*/
public function createMessage( $charset = 'UTF-8' )
{
return new MW_Mail_Message_Typo3( clone $this->_object, $charset );
}
/**
* Sends the e-mail message to the mail server.
*
* @param MW_Mail_Message_Interface $message E-mail message object
*/
public function send( MW_Mail_Message_Interface $message )
{
$message->getObject()->send();
}
/**
* Clones the internal objects.
*/
public function __clone()
{
$this->_object = clone $this->_object;
}
}