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: /*
 4:  * This file is part of SwiftMailer.
 5:  * (c) 2004-2009 Chris Corbyn
 6:  *
 7:  * For the full copyright and license information, please view the LICENSE
 8:  * file that was distributed with this source code.
 9:  */
10: 
11: /**
12:  * The Message class for building emails.
13:  * @package Swift
14:  * @subpackage Mime
15:  * @author Chris Corbyn
16:  */
17: class Swift_Message extends Swift_Mime_SimpleMessage
18: {
19:     /**
20:      * Create a new Message.
21:      * Details may be optionally passed into the constructor.
22:      * @param string $subject
23:      * @param string $body
24:      * @param string $contentType
25:      * @param string $charset
26:      */
27:     public function __construct($subject = null, $body = null, $contentType = null, $charset = null)
28:     {
29:         call_user_func_array(
30:             array($this, 'Swift_Mime_SimpleMessage::__construct'),
31:             Swift_DependencyContainer::getInstance()
32:                 ->createDependenciesFor('mime.message')
33:             );
34: 
35:         if (!isset($charset)) {
36:             $charset = Swift_DependencyContainer::getInstance()
37:                 ->lookup('properties.charset');
38:         }
39:         $this->setSubject($subject);
40:         $this->setBody($body);
41:         $this->setCharset($charset);
42:         if ($contentType) {
43:             $this->setContentType($contentType);
44:         }
45:     }
46: 
47:     /**
48:      * Create a new Message.
49:      * @param  string             $subject
50:      * @param  string             $body
51:      * @param  string             $contentType
52:      * @param  string             $charset
53:      * @return Swift_Mime_Message
54:      */
55:     public static function newInstance($subject = null, $body = null, $contentType = null, $charset = null)
56:     {
57:         return new self($subject, $body, $contentType, $charset);
58:     }
59: 
60:     /**
61:      * Add a MimePart to this Message.
62:      * @param string|Swift_OutputByteStream $body
63:      * @param string                        $contentType
64:      * @param string                        $charset
65:      */
66:     public function addPart($body, $contentType = null, $charset = null)
67:     {
68:         return $this->attach(Swift_MimePart::newInstance(
69:             $body, $contentType, $charset
70:             ));
71:     }
72: 
73:     public function __wakeup()
74:     {
75:         Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.message');
76:     }
77: }
78: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen