Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 1: <?php
 2: /**
 3:  * This file contains the maillog collection and item class.
 4:  *
 5:  * @package Core
 6:  * @subpackage GenericDB_Model
 7:  * @version SVN Revision $Rev:$
 8:  *
 9:  * @author Simon Sprankel
10:  * @copyright four for business AG <www.4fb.de>
11:  * @license http://www.contenido.org/license/LIZENZ.txt
12:  * @link http://www.4fb.de
13:  * @link http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Mail log collection
20:  *
21:  * @package Core
22:  * @subpackage GenericDB_Model
23:  */
24: class cApiMailLogCollection extends ItemCollection {
25: 
26:     /**
27:      * Constructor
28:      */
29:     public function __construct() {
30:         global $cfg;
31:         parent::__construct($cfg['tab']['mail_log'], 'idmail');
32:         $this->_setItemClass('cApiMailLog');
33:     }
34: 
35:     /**
36:      * Creates a new mail log entry with the given data.
37:      * @param string|array $from
38:      * @param string|array $to
39:      * @param string|array $replyTo
40:      * @param string|array $cc
41:      * @param string|array $bcc
42:      * @param string $subject
43:      * @param string $body
44:      * @param string $created timestamp!
45:      * @param string $charset
46:      * @param string $contentType
47:      * @return cApiMailLog
48:      */
49:     public function create($from, $to, $replyTo, $cc, $bcc, $subject, $body, $created, $charset, $contentType) {
50:         $item = $this->createNewItem();
51: 
52:         $item->set('from', json_encode($from));
53:         $item->set('to', json_encode($to));
54:         $item->set('reply_to', json_encode($replyTo));
55:         $item->set('cc', json_encode($cc));
56:         $item->set('bcc', json_encode($bcc));
57:         $item->set('subject', $subject);
58:         $item->set('body', $body);
59:         $date = date('Y-m-d H:i:s', $created);
60:         $item->set('created', $date, false);
61:         $idclient = cRegistry::getClientId();
62:         $item->set('idclient', $idclient);
63:         $idlang = cRegistry::getLanguageId();
64:         $item->set('idlang', $idlang);
65:         $item->set('charset', $charset);
66:         $item->set('content_type', $contentType);
67: 
68:         $item->store();
69: 
70:         return $item;
71:     }
72: }
73: 
74: /**
75:  * Mail log item
76:  *
77:  * @package Core
78:  * @subpackage GenericDB_Model
79:  */
80: class cApiMailLog extends Item {
81: 
82:     /**
83:      * Constructor
84:      *
85:      * @param mixed $mId
86:      */
87:     public function __construct($mId = false) {
88:         global $cfg;
89:         parent::__construct($cfg['tab']['mail_log'], 'idmail');
90:         $this->setFilters(array(), array());
91:         if ($mId !== false) {
92:             $this->loadByPrimaryKey($mId);
93:         }
94:     }
95: }
96: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen