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

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinymce4Configuration
  • cTinyMCE4Editor
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TODOBackendList
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • addArtspec
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeInlineScript
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileContents
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParam
  • getParentAreaId
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • putFileContents
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: /**
  3:  * This file contains the cMail class which should be used for all mail sending
  4:  * purposes.
  5:  *
  6:  * @package Core
  7:  * @subpackage Backend
  8:  * @version SVN Revision $Rev:$
  9:  *
 10:  * @author Rusmir Jusufovic, Simon Sprankel
 11:  * @copyright four for business AG <www.4fb.de>
 12:  * @license http://www.contenido.org/license/LIZENZ.txt
 13:  * @link http://www.4fb.de
 14:  * @link http://www.contenido.org
 15:  */
 16: 
 17: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 18: 
 19: // since CONTENIDO has it's own autoloader, swift_init.php is enough
 20: // we do not need and should not use swift_required.php!
 21: require_once 'swiftmailer/lib/swift_init.php';
 22: 
 23: /**
 24:  * Mailer class which should be used for all mail sending purposes.
 25:  *
 26:  * @package Core
 27:  * @subpackage Backend
 28:  */
 29: class cMailer extends Swift_Mailer {
 30: 
 31:     /**
 32:      * The mail host name
 33:      *
 34:      * @var string
 35:      */
 36:     private $_mailHost = 'localhost';
 37: 
 38:     /**
 39:      * The username for authentication at the host
 40:      *
 41:      * @var string
 42:      */
 43:     private $_mailUser = '';
 44: 
 45:     /**
 46:      * The password for authentication at the host
 47:      *
 48:      * @var string
 49:      */
 50:     private $_mailPass = '';
 51: 
 52:     /**
 53:      * The encryption method (ssl/tls).
 54:      *
 55:      * @var string
 56:      */
 57:     private $_mailEncryption = NULL;
 58: 
 59:     /**
 60:      * The port to use at the host
 61:      *
 62:      * @var int
 63:      */
 64:     private $_mailPort = 25;
 65: 
 66:     /**
 67:      * The mail address of the sender
 68:      *
 69:      * @var string
 70:      */
 71:     private $_mailSender = 'noreply@contenido.org';
 72: 
 73:     /**
 74:      * The name of the sender
 75:      *
 76:      * @var string
 77:      */
 78:     private $_mailSenderName = 'CONTENIDO Backend';
 79: 
 80:     /**
 81:      * Constructor
 82:      *
 83:      * @param Swift_Transport $transport [optional]
 84:      *         the transport type
 85:      */
 86:     public function __construct($transport = NULL) {
 87:         // get sender mail from system properties
 88:         $mailSender = getSystemProperty('system', 'mail_sender');
 89:         if (Swift_Validate::email($mailSender)) {
 90:             $this->_mailSender = $mailSender;
 91:         }
 92: 
 93:         // get sender name from system properties
 94:         $mailSenderName = getSystemProperty('system', 'mail_sender_name');
 95:         if (!empty($mailSenderName)) {
 96:             $this->_mailSenderName = $mailSenderName;
 97:         }
 98: 
 99:         // if a transport object has been given, use it
100:         if (!is_null($transport)) {
101:             parent::__construct($transport);
102:             return;
103:         }
104: 
105:         // if no transport object has been given, read system setting and create
106:         // one
107:         // get mailserver host from system properties
108:         $mailHost = getSystemProperty('system', 'mail_host');
109:         if (!empty($mailHost)) {
110:             $this->_mailHost = $mailHost;
111:         }
112: 
113:         // get mailserver user and pass from system properties
114:         $this->_mailUser = (getSystemProperty('system', 'mail_user')) ? getSystemProperty('system', 'mail_user') : '';
115:         $this->_mailPass = (getSystemProperty('system', 'mail_pass')) ? getSystemProperty('system', 'mail_pass') : '';
116: 
117:         // get mailserver encryption from system properties
118:         $encryptions = array(
119:             'tls',
120:             'ssl'
121:         );
122:         $mail_encryption = strtolower(getSystemProperty('system', 'mail_encryption'));
123:         if (in_array($mail_encryption, $encryptions)) {
124:             $this->_mailEncryption = $mail_encryption;
125:         } elseif ('1' == $mail_encryption) {
126:             $this->_mailEncryption = 'ssl';
127:         } else {
128:             $this->_mailEncryption = 'tls';
129:         }
130: 
131:         // get mailserver port from system properties
132:         if (is_numeric(getSystemProperty('system', 'mail_port'))) {
133:             $this->_mailPort = (int) getSystemProperty('system', 'mail_port');
134:         }
135: 
136:         // try to use SMTP
137:         $transport = self::constructTransport($this->_mailHost, $this->_mailPort, $this->_mailEncryption, $this->_mailUser, $this->_mailPass);
138:         parent::__construct($transport);
139:     }
140: 
141:     /**
142:      * Tries to establish an SMTP connection with the given settings.
143:      * If this is possible, a Swift_SmtpTransport object is returned. Otherwise
144:      * a simple Swift_MailTransport object is returned.
145:      *
146:      * @param string $mailHost
147:      *         the mail host
148:      * @param string $mailPort
149:      *         the mail port
150:      * @param string $mailEncryption [optional]
151:      *         the mail encryption
152:      * @param string $mailUser [optional]
153:      *         the mail user
154:      * @param string $mailPass [optional]
155:      *         the mail password
156:      * @return Swift_SmtpTransport|Swift_MailTransport
157:      *         the transport object
158:      */
159:     public static function constructTransport($mailHost, $mailPort, $mailEncryption = NULL, $mailUser = NULL, $mailPass = NULL) {
160:         // try to use SMTP
161:         $transport = Swift_SmtpTransport::newInstance($mailHost, $mailPort, $mailEncryption);
162:         if (!empty($mailUser)) {
163:             $authHandler = new Swift_Transport_Esmtp_AuthHandler(array(
164:                 new Swift_Transport_Esmtp_Auth_PlainAuthenticator(),
165:                 new Swift_Transport_Esmtp_Auth_LoginAuthenticator(),
166:                 new Swift_Transport_Esmtp_Auth_CramMd5Authenticator()
167:             ));
168:             $authHandler->setUsername($mailUser);
169:             if (!empty($mailPass)) {
170:                 $authHandler->setPassword($mailPass);
171:             }
172:             $transport->setExtensionHandlers(array(
173:                 $authHandler
174:             ));
175:         }
176: 
177:         // check if SMTP usage is possible
178:         try {
179:             $transport->start();
180:         } catch (Swift_TransportException $e) {
181:             // if SMTP is not possible, simply use PHP's mail() functionality
182:             $transport = Swift_MailTransport::newInstance();
183:         }
184: 
185:         return $transport;
186:     }
187: 
188:     /**
189:      * Sets the charset of the messages which are sent with this mailer object.
190:      * If you want to use UTF-8, you do not need to call this method.
191:      *
192:      * @param string $charset
193:      *         the character encoding
194:      */
195:     public function setCharset($charset) {
196:         Swift_Preferences::getInstance()->setCharset($charset);
197:     }
198: 
199:     /**
200:      * Wrapper function for sending a mail.
201:      * All parameters which accept mail addresses also accept an array where
202:      * the key is the email address and the value is the name.
203:      *
204:      * @param string|array $from
205:      *         the sender of the mail, if something "empty" is given,
206:      *         default address from CONTENIDO system settings is used
207:      * @param string|array $to
208:      *         one or more recipient addresses
209:      * @param string $subject
210:      *         the subject of the mail
211:      * @param string $body [optional]
212:      *         the body of the mail
213:      * @param string|array $cc [optional]
214:      *         one or more recipient addresses which should get a normal copy
215:      * @param string|array $bcc [optional]
216:      *         one or more recipient addresses which should get a blind copy
217:      * @param string|array $replyTo [optional]
218:      *         address to which replies should be sent
219:      * @param bool $resend [optional]
220:      *         whether the mail is resent
221:      * @param string $contentType
222:      * @return int
223:      *         number of recipients to which the mail has been sent
224:      */
225:     public function sendMail($from, $to, $subject, $body = '', $cc = NULL, $bcc = NULL, $replyTo = NULL, $resend = false, $contentType = 'text/plain') {
226:         $message = Swift_Message::newInstance($subject, $body, $contentType);
227:         if (empty($from) || is_array($from) && count($from) > 1) {
228:             $message->setFrom(array(
229:                 $this->_mailSender => $this->_mailSenderName
230:             ));
231:         } else {
232:             $message->setFrom($from);
233:         }
234:         $message->setTo($to);
235:         $message->setCc($cc);
236:         $message->setBcc($bcc);
237:         $message->setReplyTo($replyTo);
238:         $failedRecipients = array();
239: 
240:         return $this->send($message, $failedRecipients, $resend);
241:     }
242: 
243:     /**
244:      * Sends the given Swift_Mime_Message and logs it if $resend is false.
245:      *
246:      * @see Swift_Mailer::send()
247:      * @param Swift_Mime_Message $message
248:      * @param array &$failedRecipients [optional]
249:      * @param bool $resend [optional]
250:      * @return int
251:      */
252:     public function send(Swift_Mime_Message $message, &$failedRecipients = NULL, $resend = false) {
253:         if (!is_array($failedRecipients)) {
254:             $failedRecipients = array();
255:         }
256:         $result = parent::send($message, $failedRecipients);
257: 
258:         // log the mail only if it is a new one
259:         if (!$resend) {
260:             $this->_logMail($message, $failedRecipients);
261:         }
262: 
263:         return $result;
264:     }
265: 
266:     /**
267:      * Resends the mail with the given idmailsuccess.
268:      *
269:      * @param int $idmailsuccess
270:      *         the ID of the mail which should be resend
271:      * @throws cInvalidArgumentException
272:      *         if the mail has already been sent successfully or does not exist
273:      */
274:     public function resendMail($idmailsuccess) {
275:         $mailLogSuccess = new cApiMailLogSuccess($idmailsuccess);
276:         if (!$mailLogSuccess->isLoaded() || $mailLogSuccess->get('success') == 1) {
277:             throw new cInvalidArgumentException('The mail which should be resent has already been sent successfully or does not exist.');
278:         }
279: 
280:         // get all fields, json-decode address fields
281:         $idmail = $mailLogSuccess->get('idmail');
282:         $mailLog = new cApiMailLog($idmail);
283:         $from = json_decode($mailLog->get('from'), true);
284:         $to = json_decode($mailLog->get('to'), true);
285:         $replyTo = json_decode($mailLog->get('reply_to'), true);
286:         $cc = json_decode($mailLog->get('cc'), true);
287:         $bcc = json_decode($mailLog->get('bcc'), true);
288:         $subject = $mailLog->get('subject');
289:         $body = $mailLog->get('body');
290:         $contentType = $mailLog->get('content_type');
291:         $this->setCharset($mailLog->get('charset'));
292: 
293:         // decode all fields
294:         $charset = $mailLog->get('charset');
295:         $from = $this->decodeField($from, $charset);
296:         $to = $this->decodeField($to, $charset);
297:         $replyTo = $this->decodeField($replyTo, $charset);
298:         $cc = $this->decodeField($cc, $charset);
299:         $bcc = $this->decodeField($bcc, $charset);
300:         $subject = $this->decodeField($subject, $charset);
301:         $body = $this->decodeField($body, $charset);
302: 
303:         $success = $this->sendMail($from, $to, $subject, $body, $cc, $bcc, $replyTo, true, $contentType);
304: 
305:         if ($success) {
306:             $mailLogSuccess->set('success', 1);
307:             $mailLogSuccess->store();
308:         }
309:     }
310: 
311:     /**
312:      * Encodes the given value / the given array values with htmlentities.
313:      *
314:      * @param string|array $value
315:      *         the value to encode
316:      * @param string $charset
317:      *         the charset to use in htmlentities
318:      * @return string|array
319:      *         encoded value
320:      */
321:     private function encodeField($value, $charset) {
322:         if (is_array($value)) {
323:             for ($i = 0; $i < count($value); $i++) {
324:                 if (!empty($value[$i])) {
325:                     $value[$i] = conHtmlEntities($value[$i], ENT_COMPAT, $charset, false);
326:                 }
327:             }
328:             return $value;
329:         } else if (is_string($value)) {
330:             return conHtmlentities($value, ENT_COMPAT, $charset, false);
331:         }
332:         return $value;
333:     }
334: 
335:     /**
336:      * Decodes the given value / the given array values with html_entity_decode.
337:      *
338:      * @param string|array $value
339:      *         the value to decode
340:      * @param string $charset
341:      *         the charset to use in htmlentities
342:      * @return string|array
343:      *         decoded value
344:      */
345:     private function decodeField($value, $charset) {
346:         if (is_array($value)) {
347:             for ($i = 0; $i < count($value); $i++) {
348:                 if (!empty($value[$i])) {
349:                     $value[$i] = conHtmlEntityDecode($value[$i], ENT_COMPAT | ENT_HTML401, $charset, false);
350:                 }
351:             }
352:         } else if (is_string($value)) {
353:             return conHtmlEntityDecode($value, ENT_COMPAT | ENT_HTML401, $charset);
354:         }
355:         return $value;
356:     }
357: 
358:     /**
359:      * Log the information about sending the email.
360:      *
361:      * @param Swift_Message $message
362:      *         the message which has been send
363:      * @param array $failedRecipients [optional]
364:      *         the recipient addresses that did not get the mail
365:      * @return string|bool
366:      *         the idmail of the inserted table row in con_mail_log|bool
367:      *         false if mail_log option is inactive
368:      */
369:     private function _logMail(Swift_Mime_Message $message, array $failedRecipients = array()) {
370: 
371:         // Log only if mail_log is active otherwise return false
372:         $mail_log = getSystemProperty('system', 'mail_log');
373:         if ($mail_log == 'false') {
374:             return false;
375:         }
376: 
377:         $mailLogCollection = new cApiMailLogCollection();
378: 
379:         // encode all fields
380:         $charset = $message->getCharset();
381:         $from = $this->encodeField($message->getFrom(), $charset);
382:         $to = $this->encodeField($message->getTo(), $charset);
383:         $replyTo = $this->encodeField($message->getReplyTo(), $charset);
384:         $cc = $this->encodeField($message->getCc(), $charset);
385:         $bcc = $this->encodeField($message->getBcc(), $charset);
386:         $subject = $this->encodeField($message->getSubject(), $charset);
387:         $body = $this->encodeField($message->getBody(), $charset);
388:         $contentType = $message->getContentType();
389:         $mailItem = $mailLogCollection->create($from, $to, $replyTo, $cc, $bcc, $subject, $body, time(), $charset, $contentType);
390: 
391:         // get idmail variable
392:         $idmail = $mailItem->get('idmail');
393: 
394:         // do not use array_merge here since the mail addresses are array keys
395:         // array_merge will make problems if one recipient is e.g. in cc and bcc
396:         $recipientArrays = array(
397:             $message->getTo(),
398:             $message->getCc(),
399:             $message->getBcc()
400:         );
401:         $mailLogSuccessCollection = new cApiMailLogSuccessCollection();
402:         foreach ($recipientArrays as $recipients) {
403:             if (!is_array($recipients)) {
404:                 continue;
405:             }
406:             foreach ($recipients as $key => $value) {
407:                 $recipient = array(
408:                     $key => $value
409:                 );
410:                 $success = true;
411:                 // TODO how do we get the information why message sending
412:                 // has
413:                 // failed?
414:                 $exception = '';
415:                 if (in_array($key, $failedRecipients)) {
416:                     $success = false;
417:                 }
418:                 $mailLogSuccessCollection->create($idmail, $recipient, $success, $exception);
419:             }
420:         }
421: 
422:         return $idmail;
423:     }
424: 
425: }
426: 
CMS CONTENIDO 4.9.8 API documentation generated by ApiGen 2.8.0