Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

Class EmailDeliveryBehavior

Email delivery methods.

CComponent
Extended by CBehavior implements IBehavior
Extended by EmailDeliveryBehavior

Direct known subclasses

CampaignMailingBehavior
Package: application\components
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/components/EmailDeliveryBehavior.php
Methods summary
public static
# addressHeaderToArray( type $header, mixed $ignoreInvalidAddresses = false )

Parses a To, CC, or BCC header into an array compatible with PHPMailer.

Parses a To, CC, or BCC header into an array compatible with PHPMailer.

Each element of the array corresponds to an email addressee; the first element is the name, the second, the value.

The special case of "LastName, FirstName" is covered (splitting on commas will break in this case) is covered by using a bit of RegExp from an idea shared here:

http://stackoverflow.com/a/2202489/1325798

Parameters

$header
type
$header
$ignoreInvalidAddresses
public
# addEmailAddresses( type & $phpMail, type $addresses )

Adds email addresses to a PHPMail object

Adds email addresses to a PHPMail object

Parameters

$phpMail
type
$phpMail
$addresses
type
$addresses
public true
# validateFileSize( integer $size )

Parameters

$size
integer
size

Returns

true
if file size is acceptable

Throws

Exception
if size exceeds limit
public array
# deliverEmail( array $addresses, mixed $subject, mixed $message, mixed $attachments = array(), mixed $unsubLink = null )

Perform the email delivery with PHPMailer.

Perform the email delivery with PHPMailer.

Any special authentication and security should take place in here.

Parameters

$addresses
array
$addresses This array must contain "to", "cc" and/or "bcc" keys, and values must be arrays of recipients. Each recipient is expressed as a 2-element array with the first element being the name, and the second the email address.
$subject
$message
$attachments
$unsubLink

Returns

array

Throws

Exception
public
# clearTemporaryFiles( array $attachments = array () )
public
# getCredentials( )

Getter for credentials returns Credentials

Getter for credentials returns Credentials

public
# getCredId( )
public
# getDebugStatus( )

Gets the status used when "faking" an email send.

Gets the status used when "faking" an email send.

public array
# getFrom( )

Getter for from

Getter for from

Returns

array
public PHPMailer
# getMailer( )

Magic getter for phpMailer

Magic getter for phpMailer

Returns

PHPMailer
public Profile
# getUserProfile( )

Magic getter for userProfile

Magic getter for userProfile

Returns

Profile
public
# setCredId( mixed $value )
public
# setFrom( mixed $from )
public
# setUserProfile( Profile $profile )

Magic setter for userProfile

Magic setter for userProfile

Parameters

$profile
Profile
$profile
public
# testUserCredentials( mixed $email, mixed $password, mixed $server, mixed $port, mixed $security )
Methods inherited from CBehavior
attach(), detach(), events(), getEnabled(), getOwner(), setEnabled()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public array $status array()
#

Status codes

Status codes

Magic properties summary
public Credentials $credentials
#

(read-only) The SMTP account to use for delivery, if applicable.

(read-only) The SMTP account to use for delivery, if applicable.

public array $from
#

The sender of the email.

The sender of the email.

public PHPMailer $mailer
#

PHPMailer instance

PHPMailer instance

public Profile $userProfile
#

Profile, i.e. for email sender and signature

Profile, i.e. for email sender and signature

Magic properties inherited from CBehavior
$enabled, $owner
X2CRM Documentation API documentation generated by ApiGen 2.8.0