clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • _flFormGroup
  • _flUtf8Base
  • flAcMgr
  • flApiDbInstaller
  • flApiKeyMgr
  • flApiServer
  • flApiService
  • flApp
  • flAuthTOTP
  • flBufferCode
  • flBufferCss
  • flBufferJs
  • flCache
  • flCacheAPC
  • flCacheDb
  • flCacheDbInstaller
  • flCacheDummy
  • flCacheFile
  • flCacheFunction
  • flCacheMemcache
  • flCacheMemcached
  • flCacheOutput
  • flCacheRedis
  • flCacheSqlite
  • flConfig
  • flConfigDb
  • flConfigDbInstaller
  • flConfigFile
  • flConfigIni
  • flController
  • flControllerAction
  • flDate
  • flDateTzMenu
  • flDb
  • flDbInstaller
  • flDbInstallerInterface
  • flDbMySQL
  • flDbMySQLi
  • flDbMySQLiResult
  • flDbMySQLResult
  • flDbNestedSet
  • flDbResult
  • flDbSQLite
  • flDbSQLite3
  • flDbSQLite3Result
  • flDbSQLiteResult
  • flEmail
  • flEvent
  • flEventDbInstaller
  • flEventManager
  • flExceptionErrorController
  • flExceptionReporter
  • flForm
  • flFormBuilder
  • flFormDecorator
  • flFormDecoratorDl
  • flFormDecoratorDtDd
  • flFormDecoratorFieldset
  • flFormDecoratorForm
  • flFormDecoratorLi
  • flFormDecoratorList
  • flFormDecoratorUl
  • flFormElement
  • flFormElementButton
  • flFormElementCheckbox
  • flFormElementChecklist
  • flFormElementEmail
  • flFormElementFile
  • flFormElementHidden
  • flFormElementImage
  • flFormElementInteger
  • flFormElementNumber
  • flFormElementPane
  • flFormElementPassword
  • flFormElementRadio
  • flFormElementRecaptcha
  • flFormElementSearch
  • flFormElementSelect
  • flFormElementSubmit
  • flFormElementText
  • flFormElementTextArea
  • flFormElementTextSuggest
  • flFormElementUri
  • flFormElementWYSIWYG
  • flFormValidator
  • flFormValidatorAttribMax
  • flFormValidatorAttribMin
  • flFormValidatorCustomJS
  • flFormValidatorEmail
  • flFormValidatorEquals
  • flFormValidatorInteger
  • flFormValidatorMax
  • flFormValidatorMaxChecklist
  • flFormValidatorMaxLength
  • flFormValidatorMin
  • flFormValidatorMinChecklist
  • flFormValidatorMinLength
  • flFormValidatorMultiEmail
  • flFormValidatorNotEquals
  • flFormValidatorNumber
  • flFormValidatorRegex
  • flFormValidatorRequired
  • flFormValidatorSameAs
  • flFormValidatorUri
  • flFtpClient
  • flGravatar
  • flHttpClient
  • flHttpClientCookie
  • flImage
  • flImageFilter
  • flImageFilterBrightness
  • flImageFilterColorize
  • flImageFilterContrast
  • flImageFilterEdgeDetect
  • flImageFilterEmboss
  • flImageFilterGaussianBlur
  • flImageFilterGrayscale
  • flImageFilterMeanRemoval
  • flImageFilterNegative
  • flImageFilterPixelate
  • flImageFilterSelectiveBlur
  • flImageFilterSepia
  • flImageFilterSepia2
  • flImageFilterSmooth
  • flIntegrity
  • flKeygen
  • flLog
  • flLogHandlerChrome
  • flLogHandlerLoggly
  • flLogHandlerPapertrail
  • flLogHandlerSlack
  • flMimeTypes
  • flModuleDbInstaller
  • flModuleMgr
  • flRegistry
  • flRequest
  • flRequestDbInstaller
  • flRequestThrottle
  • flResponse
  • flRouter
  • flRouterRoute
  • flRssChannel
  • flRssClient
  • flRssItem
  • flSearch
  • flSearchIndexer
  • flSearchManager
  • flSearchResults
  • flSearchTags
  • flSession
  • flSessionData
  • flSessionDb
  • flSessionDbInstaller
  • flSessionFile
  • flSessionMemcache
  • flSessionMemcached
  • flSessionRedis
  • flTemplateDbInstaller
  • flTemplateEngine
  • flTemplateManager
  • flTextHTML
  • flTextSplitWords
  • flTextStemmer
  • flTextStemmerEn
  • flTextStrip
  • flTimer
  • flUri
  • flUser
  • flUserAdapter
  • flUserAdapterRemote
  • flUserDbInstaller
  • flUserMgr
  • flUserPwdGen
  • flUserServerApiV1
  • flUtf8
  • flUuid
  • flVariables
  • flVariablesDbInstaller
  • flWidgetBreadcrumb
  • flWidgetFloatingActionMenu
  • flWidgetPagination
  • flWidgetTable
  • flWidgetTabs
  • flWidgetToolbar
  • flWidgetTreeChildNode
  • flWidgetTreeLinkNode
  • flWidgetTreeNode
  • flWidgetTreeView
  • fusionLib

Interfaces

  • flFormElementWYSIWYGCodeInterface
  • flFormElementWYSIWYGInterface
  • flFormElementWYSIWYGTransformInterface
  • flLogHandler
  • flModuleInstallInterface

Exceptions

  • flAcException
  • flAppException
  • flCacheException
  • flConfigException
  • flDateException
  • flDbException
  • flEventException
  • flException
  • flExceptionBadRequest
  • flExceptionForbidden
  • flExceptionLoadClass
  • flExceptionNotFound
  • flExceptionPHP
  • flFormException
  • flHttpClientException
  • flImageException
  • flRegistryException
  • flRequestThrottleException
  • flRouterException
  • flSessionException
  • flTemplateEngineException
  • flUserException
  • flVariablesException
  • flWidgetException

Functions

  • __
  • __noop
  • _flErrorHandler
  • _n
  • _n_noop

Class flEmail

flEmail Class

Class to send email direct through an smtp server or via the mail command. The class also supports sending HTML emails and file attachments.

SMTP interface supports HELO, EHLO, AUTH LOGIN, AUTH PLAIN, MAIL, RCPT and DATA commands.

Package: fusionLib
Copyright: Copyright (c) 2007 - 2013 fusionLib. All rights reserved.
Located at system/libs/Email/flEmail.php

Methods summary

public
# __construct( string $charset = 'utf-8' )

Create a new mailer object and optionally set the character set being used.

Create a new mailer object and optionally set the character set being used.

Parameters

$charset
The character set being used either 'utf-8' the default or 'iso-8859-1'.
public static
# setMailerString( string $mailer )

Set the string to use in the X-Mailer header system wide.

Set the string to use in the X-Mailer header system wide.

Parameters

$mailer
The mailer string to set.
public flEmail
# setPriority( integer $priority )

Set the priority to send the mail at.

Set the priority to send the mail at.

Parameters

$priority
The priority to use.

Returns

flEmail
This object.
public flEmail
# setLocalhost( string $localhost )

Set the host name used in HELO/EHLO negotiation.

Set the host name used in HELO/EHLO negotiation.

Parameters

$localhost
The name of the local host used in HELO/EHLO.

Returns

flEmail
This object.
public flEmail
# setServer( string $host, integer $port, string $user = '', string $pass = '' )

Set the SMTP server to use for sending emails and the authentication information.

Set the SMTP server to use for sending emails and the authentication information.

Parameters

$host
The SMTP host.
$port
The port to connect to on the SMTP server, default is 25.
$user
The user name to connect with, or '' if authentication not required.
$pass
The password for the user.

Returns

flEmail
This object.
public boolean
# connect( )

Form a connection to the SMTP server.

Form a connection to the SMTP server.

Returns

boolean
True if connected else false.
public boolean
# send( )

Send the email

Send the email

Returns

boolean
true if the email was sent or false if the email could not be sent.
public
# close( )

Close the connection to the SMTP server.

Close the connection to the SMTP server.

public flEmail
# setFrom( string $email, string $name = '' )

Set the email address of the sender.

Set the email address of the sender.

Parameters

$email
Email address of the sender.
$name
Name of the sender.

Returns

flEmail
This object.
public flEmail
# replyTo( string $email, string $name = '' )

Set the email address to send replies to.

Set the email address to send replies to.

Parameters

$email
Email address to reply to.
$name
Name of the address to reply to.

Returns

flEmail
This object.
public flEmail
# clearReplyTo( )

Clear the reply to address

Clear the reply to address

Returns

flEmail
This object.
public flEmail
# addRecipient( string $email, string $name = '' )

Add an email address to the recipient list (To:)

Add an email address to the recipient list (To:)

Parameters

$email
Email address of the recipient.
$name
Name of the recipient.

Returns

flEmail
This object.
public flEmail
# clearRecipients( )

Clear the recipient list.

Clear the recipient list.

Returns

flEmail
This object.
public flEmail
# addCc( string $email, string $name = '' )

Add an email address to the Cc list

Add an email address to the Cc list

Parameters

$email
Email address of the recipient.
$name
Name of the recipient.

Returns

flEmail
This object.
public flEmail
# clearCc( )

Clear the Cc list.

Clear the Cc list.

Returns

flEmail
This object.
public flEmail
# addBcc( string $email, string $name = '' )

Add an email address to the Bcc list

Add an email address to the Bcc list

Parameters

$email
Email address of the recipient.
$name
Name of the recipient.

Returns

flEmail
This object.
public flEmail
# clearBcc( )

Clear the Bcc list.

Clear the Bcc list.

Returns

flEmail
This object.
public flEmail
# setSubject( string $subject )

Set the subject.

Set the subject.

Parameters

$subject
The subject string.

Returns

flEmail
This object.
public flEmail
# setTextBody( string $text )

Set the text body.

Set the text body.

Parameters

$text
The text body

Returns

flEmail
This object.
public flEmail
# setHTMLBody( string $html )

Set the HTML body encoding it to quoted-printable, and references to embedded files are updated.

Set the HTML body encoding it to quoted-printable, and references to embedded files are updated.

Parameters

$html
The html body.

Returns

flEmail
This object.
public flEmail
# clearBody( )

Clear the email body.

Clear the email body.

Returns

flEmail
This object.
public boolean
# attachFile( string $file, string $type = null, string $name = null )

Attach a file to the email.

Attach a file to the email.

Parameters

$file
The file name of the file to attach.
$type
The mime type, e.g. image/jpeg
$name
Optional file name to attach the file as.

Returns

boolean
true is returned if the file was attached or false on error.
public
# attachFileData( string $data, string $type, string $name )

Attach file data to the email.

Attach file data to the email.

Parameters

$data
The file data to attach.
$type
The mime type, e.g. image/jpeg
$name
File name to attach the file as.
public flEmail
# clearAttachedFiles( )

Clear the list of attached files.

Clear the list of attached files.

Returns

flEmail
This object.
public boolean
# addEmbeddedFile( string $file, string $src, string $type = null )

Embed an image file within the email, these files are only sent if an HTML email is also present.

Embed an image file within the email, these files are only sent if an HTML email is also present.

All embedded files must be added before calling setHTMLBody or they will not be referenced.

Parameters

$file
The name of the file within the file system to embed.
$src
The file name used in the HTMl to reference the file, must be an exact match.
$type

The mime type of the file e.g. image/jpg, image/gif or image/png or null to guess the type from the file name.

Returns

boolean
true is returned if the file was embedded or false on error.
public
# addEmbeddedFileData( string $data, string $src, string $type = null )

Embed an image file within the email, these files are only sent if an HTML email is also present.

Embed an image file within the email, these files are only sent if an HTML email is also present.

All embedded files must be added before calling setHTMLBody or they will not be referenced.

Parameters

$data
The data to embed.
$src
The file name used in the HTMl to reference the file, must be an exact match.
$type

The mime type of the file e.g. image/jpg, image/gif or image/png or null to guess the type from the file name.

public flEmail
# clearEmbedded( )

Clear the list of embedded files.

Clear the list of embedded files.

Returns

flEmail
This object.

Constants summary

integer HIGH

Email priority.

Email priority.

# 1
integer NORMAL
# 3
integer LOW
# 5
clearFusionCMS 3.0.0 API documentation generated by ApiGen