Overview

Namespaces

  • Composer
    • Autoload
  • Geekwright
    • RegDom
  • League
    • OAuth2
      • Client
        • Provider
  • None
  • Xmf
    • Database
    • Jwt
    • Key
    • Module
      • Helper

Classes

  • ArtObject
  • ArtObjectHandler
  • BloggerApi
  • CGIF
  • CGIFCOLORTABLE
  • CGIFFILEHEADER
  • CGIFIMAGE
  • CGIFIMAGEHEADER
  • CGIFLZW
  • ComposerAutoloaderInit274e5fff219a4f27a346e611b0580d6a
  • Config_File
  • Cookie
  • Criteria
  • CriteriaCompo
  • CriteriaElement
  • Database
  • Db_manager
  • ErrorHandler
  • FormDhtmlTextArea
  • FormTextArea
  • HTMLPurifier
  • MetaWeblogApi
  • ModuleAdmin
  • MovableTypeApi
  • MyTextSanitizer
  • MyTextSanitizerExtended
  • MyTextSanitizerExtension
  • MytsCensor
  • MytsFlash
  • MytsIframe
  • MytsImage
  • MytsLi
  • MytsMms
  • MytsMp3
  • MytsRtsp
  • MytsSoundcloud
  • MytsSyntaxhighlight
  • MytsTextfilter
  • MytsUl
  • MytsWiki
  • MytsWmp
  • MytsYoutube
  • PathStuffController
  • PHPMailer
  • PHPMailerOAuth
  • PHPMailerOAuthGoogle
  • phpthumb
  • phpthumb_bmp
  • phpthumb_filters
  • phpthumb_functions
  • phpthumb_ico
  • phpUnsharpMask
  • PmCorePreload
  • PmMessage
  • PmMessageHandler
  • PmSystemPreload
  • POP3
  • ProfileCategory
  • ProfileCategoryHandler
  • ProfileCorePreload
  • ProfileField
  • ProfileFieldHandler
  • ProfileProfile
  • ProfileProfileHandler
  • ProfileRegstep
  • ProfileRegstepHandler
  • ProfileVisibility
  • ProfileVisibilityHandler
  • Protector
  • Protector_bruteforce_overrun_message
  • Protector_crawler_overrun_message
  • Protector_f5attack_overrun_message
  • Protector_postcommon_post_deny_by_httpbl
  • Protector_postcommon_post_deny_by_rbl
  • Protector_postcommon_post_htmlpurify4everyone
  • Protector_postcommon_post_htmlpurify4guest
  • Protector_postcommon_post_language_match
  • Protector_postcommon_post_need_multibyte
  • Protector_postcommon_post_register_moratorium
  • Protector_postcommon_post_stopforumspam
  • Protector_postcommon_register_insert_js_check
  • Protector_postcommon_register_stopforumspam
  • Protector_precommon_badip_errorlog
  • Protector_precommon_badip_message
  • Protector_precommon_badip_redirection
  • Protector_precommon_bwlimit_errorlog
  • Protector_precommon_bwlimit_message
  • Protector_prepurge_exit_message
  • Protector_spamcheck_overrun_message
  • ProtectorCorePreload
  • ProtectorFilterAbstract
  • ProtectorFilterHandler
  • ProtectorMySQLDatabase
  • ProtectorRegistry
  • ReCaptchaResponse
  • RpcArrayHandler
  • RpcBase64Handler
  • RpcBooleanHandler
  • RpcDateTimeHandler
  • RpcDoubleHandler
  • RpcIntHandler
  • RpcMemberHandler
  • RpcMethodNameHandler
  • RpcNameHandler
  • RpcStringHandler
  • RpcStructHandler
  • RpcValueHandler
  • RssAuthorHandler
  • RssCategoryHandler
  • RssChannelHandler
  • RssCommentsHandler
  • RssCopyrightHandler
  • RssDescriptionHandler
  • RssDocsHandler
  • RssGeneratorHandler
  • RssGuidHandler
  • RssHeightHandler
  • RssImageHandler
  • RssItemHandler
  • RssLanguageHandler
  • RssLastBuildDateHandler
  • RssLinkHandler
  • RssManagingEditorHandler
  • RssNameHandler
  • RssPubDateHandler
  • RssSourceHandler
  • RssTextInputHandler
  • RssTitleHandler
  • RssTtlHandler
  • RssUrlHandler
  • RssWebMasterHandler
  • RssWidthHandler
  • SaxParser
  • Smarty
  • Smarty_Compiler
  • SMTP
  • Snoopy
  • SqlUtility
  • SystemAvatar
  • SystemAvatarHandler
  • SystemBanner
  • SystemBannerclient
  • SystemBannerclientHandler
  • SystemBannerFinish
  • SystemBannerfinishHandler
  • SystemBannerHandler
  • SystemBlock
  • SystemBlockHandler
  • SystemBlockLinkModule
  • SystemBlockLinkModuleHandler
  • SystemBreadcrumb
  • SystemCorePreload
  • SystemFineAvatarUploadHandler
  • SystemFineImUploadHandler
  • SystemFineUploadHandler
  • SystemGroup
  • SystemGroupHandler
  • SystemMaintenance
  • SystemMenuHandler
  • SystemSmilies
  • SystemsmiliesHandler
  • SystemUserrank
  • SystemuserrankHandler
  • SystemUsers
  • SystemUsersHandler
  • Tar
  • ThemeSetAuthorHandler
  • ThemeSetDateCreatedHandler
  • ThemeSetDescriptionHandler
  • ThemeSetEmailHandler
  • ThemeSetFileTypeHandler
  • ThemeSetGeneratorHandler
  • ThemeSetImageHandler
  • ThemeSetLinkHandler
  • ThemeSetModuleHandler
  • ThemeSetNameHandler
  • ThemeSetTagHandler
  • ThemeSetTemplateHandler
  • TinyMCE
  • XmlTagHandler
  • XoopsApi
  • xoopsart
  • XoopsAuth
  • XoopsAuthAds
  • XoopsAuthFactory
  • XoopsAuthLdap
  • XoopsAuthProvisionning
  • XoopsAuthXoops
  • XoopsAvatar
  • XoopsAvatarHandler
  • XoopsBlock
  • XoopsBlockHandler
  • XoopsBlockInstance
  • XoopsBlockInstanceHandler
  • XoopsCache
  • XoopsCacheApc
  • XoopsCacheEngine
  • XoopsCacheFile
  • XoopsCacheMemcache
  • XoopsCacheModel
  • XoopsCacheModelHandler
  • XoopsCacheModelObject
  • XoopsCacheXcache
  • XoopsCaptcha
  • XoopsCaptchaImage
  • XoopsCaptchaImageHandler
  • XoopsCaptchaMethod
  • XoopsCaptchaRecaptcha
  • XoopsCaptchaRecaptcha2
  • XoopsCaptchaText
  • XoopsComment
  • XoopsCommentHandler
  • XoopsCommentRenderer
  • XoopsComments
  • XoopsConfigCategory
  • XoopsConfigCategoryHandler
  • XoopsConfigHandler
  • XoopsConfigItem
  • XoopsConfigItemHandler
  • XoopsConfigOption
  • XoopsConfigOptionHandler
  • XoopsDatabase
  • XoopsDatabaseFactory
  • XoopsDownloader
  • XoopsEditor
  • XoopsEditorHandler
  • XoopsErrorHandler
  • XoopsFile
  • XoopsFileHandler
  • XoopsFilterInput
  • XoopsFolderHandler
  • XoopsForm
  • XoopsFormButton
  • XoopsFormButtonTray
  • XoopsFormCaptcha
  • XoopsFormCheckBox
  • XoopsFormColorPicker
  • XoopsFormDateTime
  • XoopsFormDhtmlTextArea
  • XoopsFormEditor
  • XoopsFormElement
  • XoopsFormElementTray
  • XoopsFormFile
  • XoopsFormHidden
  • XoopsFormHiddenToken
  • XoopsFormLabel
  • XoopsFormPassword
  • XoopsFormRadio
  • XoopsFormRadioYN
  • XoopsFormRenderer
  • XoopsFormRendererBootstrap3
  • XoopsFormRendererLegacy
  • XoopsFormSelect
  • XoopsFormSelectCheckGroup
  • XoopsFormSelectCountry
  • XoopsFormSelectEditor
  • XoopsFormSelectGroup
  • XoopsFormSelectLang
  • XoopsFormSelectMatchOption
  • XoopsFormSelectTheme
  • XoopsFormSelectTimezone
  • XoopsFormSelectUser
  • XoopsFormText
  • XoopsFormTextArea
  • XoopsFormTextDateSelect
  • XoopsFormTinymce
  • XoopsGroup
  • XoopsGroupFormCheckBox
  • XoopsGroupHandler
  • XoopsGroupPerm
  • XoopsGroupPermForm
  • XoopsGroupPermHandler
  • XoopsGTicket
  • XoopsGuestUser
  • XoopsGuiDefault
  • XoopsGuiThadmin
  • XoopsGuiTransition
  • XoopsGuiZetadigme
  • XoopsHandlerRegistry
  • XoopsImage
  • XoopsImagecategory
  • XoopsImagecategoryHandler
  • XoopsImageHandler
  • XoopsImageSet
  • XoopsImagesetHandler
  • XoopsImagesetimg
  • XoopsImagesetimgHandler
  • XoopsInstallWizard
  • XoopsLists
  • XoopsLoad
  • XoopsLocal
  • XoopsLocalAbstract
  • XoopsLocalWrapper
  • XoopsLogger
  • XoopsMailer
  • XoopsMailerLocal
  • XoopsMediaUploader
  • XoopsMemberHandler
  • XoopsMembership
  • XoopsMembershipHandler
  • XoopsModelAbstract
  • XoopsModelFactory
  • XoopsModelJoint
  • XoopsModelRead
  • XoopsModelStats
  • XoopsModelSync
  • XoopsModelWrite
  • XoopsModule
  • XoopsModuleHandler
  • XoopsMultiMailer
  • XoopsMySQLDatabase
  • XoopsMySQLDatabaseProxy
  • XoopsMySQLDatabaseSafe
  • XoopsNotification
  • XoopsNotificationHandler
  • XoopsObject
  • XoopsObjectHandler
  • XoopsObjectTree
  • XoopsOnlineHandler
  • XoopsPageNav
  • XoopsPersistableObjectHandler
  • XoopsPreload
  • XoopsPreloadItem
  • XoopsPrivmessage
  • XoopsPrivmessageHandler
  • XoopsRank
  • XoopsRankHandler
  • XoopsRequest
  • XoopsSecurity
  • XoopsSessionHandler
  • XoopsSimpleForm
  • XoopsStory
  • XoopsSystemCpanel
  • XoopsSystemGui
  • XoopsTableForm
  • XoopsTarDownloader
  • XoopsThemeForm
  • XoopsThemeSetParser
  • XoopsTopic
  • XoopsTpl
  • XoopsTplfile
  • XoopsTplfileHandler
  • XoopsTplset
  • XoopsTplsetHandler
  • XoopsTree
  • XoopsUser
  • XoopsUserHandler
  • XoopsUserUtility
  • XoopsUtility
  • XoopsXmlRpcApi
  • XoopsXmlRpcArray
  • XoopsXmlRpcBase64
  • XoopsXmlRpcBoolean
  • XoopsXmlRpcDatetime
  • XoopsXmlRpcDocument
  • XoopsXmlRpcDouble
  • XoopsXmlRpcFault
  • XoopsXmlRpcInt
  • XoopsXmlRpcParser
  • XoopsXmlRpcRequest
  • XoopsXmlRpcResponse
  • XoopsXmlRpcString
  • XoopsXmlRpcStruct
  • XoopsXmlRpcTag
  • XoopsXmlRss2Parser
  • XoopsZipDownloader
  • xos_kernel_Xoops2
  • xos_logos_PageBuilder
  • xos_opal_AdminThemeFactory
  • xos_opal_Theme
  • xos_opal_ThemeFactory
  • XoUser
  • XoUserHandler
  • Zipfile

Interfaces

  • XoopsFormRendererInterface

Exceptions

  • phpmailerException

Functions

  • __autoload
  • _recaptcha_aes_encrypt
  • _recaptcha_aes_pad
  • _recaptcha_http_post
  • _recaptcha_mailhide_email_parts
  • _recaptcha_mailhide_urlbase64
  • _recaptcha_qsencode
  • _smarty_regex_replace_check
  • _smarty_sort_length
  • admin_refcheck
  • b_system_comments_edit
  • b_system_comments_show
  • b_system_info_edit
  • b_system_info_show
  • b_system_login_show
  • b_system_main_show
  • b_system_newmembers_edit
  • b_system_newmembers_show
  • b_system_notification_show
  • b_system_online_show
  • b_system_search_show
  • b_system_themes_edit
  • b_system_themes_show
  • b_system_topposters_edit
  • b_system_topposters_show
  • b_system_user_show
  • b_system_waiting_show
  • bannerstats
  • change_banner_url_by_client
  • checkEmail
  • clickbanner
  • clientlogin
  • closeTable
  • closeThread
  • CloseWaitBox
  • composerRequire274e5fff219a4f27a346e611b0580d6a
  • createConfigform
  • createThemeform
  • doConditionalGet
  • emailStats
  • exit404BadReq
  • fatalPhpErrorHandler
  • file_get_contents
  • file_put_contents
  • findSharp
  • form_user
  • formatTimestamp
  • formatURL
  • gd_info
  • genPathCheckHtml
  • get_request_method
  • get_writeoks_from_protector
  • getcss
  • getDbCharsets
  • getDbCollations
  • getDirList
  • getMailer
  • getTheme
  • gif_getSize
  • gif_loadFile
  • gif_loadFileToGDimageResource
  • gif_outputAsBmp
  • gif_outputAsJpeg
  • gif_outputAsPng
  • HTMLPurifier
  • imagealphablending
  • imageBrowser
  • imageCreateCorners
  • imageFilenameCheck
  • imagesavealpha
  • install_acceptUser
  • install_finalize
  • is_executable
  • kses
  • langDropdown
  • load_functions
  • load_object
  • load_objectHandler
  • loadModuleAdminMenu
  • make_cblock
  • make_data
  • make_groups
  • make_sidebar
  • mod_clearCacheFile
  • mod_clearConfg
  • mod_clearConfig
  • mod_clearFile
  • mod_clearSmartyCache
  • mod_constant
  • mod_createCacheFile
  • mod_createCacheFile_byGroup
  • mod_createFile
  • mod_DB_prefix
  • mod_fetchConfg
  • mod_fetchConfig
  • mod_generateCacheId
  • mod_generateCacheId_byGroup
  • mod_getDirname
  • mod_getIP
  • mod_getMysqlVersion
  • mod_getUnameFromId
  • mod_getUnameFromIds
  • mod_isModuleAction
  • mod_loadCacheFile
  • mod_loadCacheFile_byGroup
  • mod_loadConfg
  • mod_loadConfig
  • mod_loadFile
  • mod_loadFunctions
  • mod_loadRenderer
  • mod_message
  • modify_chmod
  • myTextForm
  • notificationCategoryInfo
  • notificationCommentCategoryInfo
  • notificationEnabled
  • notificationEventEnabled
  • notificationEventInfo
  • notificationEvents
  • notificationGenerateConfig
  • notificationSubscribableCategoryInfo
  • openTable
  • openThread
  • OpenWaitBox
  • PHPMailerAutoload
  • phpThumbURL
  • preg_quote
  • profile_getFieldForm
  • profile_getRegisterForm
  • profile_getStepForm
  • profile_getUserForm
  • profile_install_addCategory
  • profile_install_addField
  • profile_install_addStep
  • profile_install_initializeProfiles
  • profile_install_setPermissions
  • protector_message_append_oninstall
  • protector_message_append_onuninstall
  • protector_message_append_onupdate
  • protector_notify_base
  • protector_oninstall_base
  • protector_onuninstall_base
  • protector_onupdate_base
  • protector_postcommon
  • protector_prepare
  • recaptcha_check_answer
  • recaptcha_get_html
  • recaptcha_get_signup_url
  • recaptcha_mailhide_html
  • recaptcha_mailhide_url
  • redirect_header
  • RedirectToCachedFile
  • SendSaveAsFileHeaderIfNeeded
  • showbanner
  • showThread
  • smarty_block_textformat
  • smarty_compiler_assign
  • smarty_compiler_foreachq
  • smarty_compiler_includeq
  • smarty_compiler_xoAdminIcons
  • smarty_compiler_xoAdminNav
  • smarty_compiler_xoAppUrl
  • smarty_compiler_xoImgUrl
  • smarty_compiler_xoModuleIcons16
  • smarty_compiler_xoModuleIcons32
  • smarty_compiler_xoModuleIconsBookmarks
  • smarty_core_assemble_plugin_filepath
  • smarty_core_assign_smarty_interface
  • smarty_core_create_dir_structure
  • smarty_core_display_debug_console
  • smarty_core_get_include_path
  • smarty_core_get_microtime
  • smarty_core_get_php_resource
  • smarty_core_is_secure
  • smarty_core_is_trusted
  • smarty_core_load_plugins
  • smarty_core_load_resource_plugin
  • smarty_core_process_cached_inserts
  • smarty_core_process_compiled_include
  • smarty_core_read_cache_file
  • smarty_core_rm_auto
  • smarty_core_rmdir
  • smarty_core_run_insert_handler
  • smarty_core_smarty_include_php
  • smarty_core_write_cache_file
  • smarty_core_write_compiled_include
  • smarty_core_write_compiled_resource
  • smarty_core_write_file
  • smarty_function_assign_debug_info
  • smarty_function_block
  • smarty_function_config_load
  • smarty_function_counter
  • smarty_function_cycle
  • smarty_function_debug
  • smarty_function_escape_special_chars
  • smarty_function_eval
  • smarty_function_fetch
  • smarty_function_html_checkboxes
  • smarty_function_html_checkboxes_output
  • smarty_function_html_image
  • smarty_function_html_options
  • smarty_function_html_options_optgroup
  • smarty_function_html_options_optoutput
  • smarty_function_html_radios
  • smarty_function_html_radios_output
  • smarty_function_html_select_date
  • smarty_function_html_select_time
  • smarty_function_html_table
  • smarty_function_html_table_cycle
  • smarty_function_mailto
  • smarty_function_math
  • smarty_function_popup
  • smarty_function_popup_init
  • smarty_function_securityToken
  • smarty_function_xoInboxCount
  • smarty_function_xoMemberInfo
  • smarty_function_xoops_link
  • smarty_function_xoPageNav
  • smarty_make_timestamp
  • smarty_modifier_capitalize
  • smarty_modifier_capitalize_ucfirst
  • smarty_modifier_cat
  • smarty_modifier_count_characters
  • smarty_modifier_count_paragraphs
  • smarty_modifier_count_sentences
  • smarty_modifier_count_words
  • smarty_modifier_date_format
  • smarty_modifier_debug_print_var
  • smarty_modifier_default
  • smarty_modifier_escape
  • smarty_modifier_indent
  • smarty_modifier_lower
  • smarty_modifier_nl2br
  • smarty_modifier_regex_replace
  • smarty_modifier_replace
  • smarty_modifier_spacify
  • smarty_modifier_string_format
  • smarty_modifier_strip
  • smarty_modifier_strip_tags
  • smarty_modifier_truncate
  • smarty_modifier_upper
  • smarty_modifier_wordwrap
  • smarty_outputfilter_trimwhitespace
  • smarty_outputfilter_trimwhitespace_replace
  • smarty_resource_db_secure
  • smarty_resource_db_source
  • smarty_resource_db_timestamp
  • smarty_resource_db_tplinfo
  • smarty_resource_db_trusted
  • synchronize
  • system_AdminIcons
  • system_adminVersion
  • system_CleanVars
  • system_loadLanguage
  • system_loadTemplate
  • themecenterposts
  • update_system_v211
  • userCheck
  • userTimeToServerTime
  • validateDbCharset
  • writeLicenseKey
  • xoBuildLicenceKey
  • xoDiag
  • xoDiagBoolSetting
  • xoDiagIfWritable
  • xoFormBlockCollation
  • xoFormField
  • xoFormFieldCharset
  • xoFormFieldCollation
  • xoFormSelect
  • xoops_aw_decode
  • xoops_aw_encode
  • xoops_bin2hex
  • xoops_comment_count
  • xoops_comment_delete
  • xoops_confirm
  • xoops_convert_decode
  • xoops_convert_encode
  • xoops_convert_encoding
  • xoops_cp_footer
  • xoops_cp_header
  • xoops_error
  • xoops_footer
  • xoops_getActiveModules
  • xoops_getbanner
  • xoops_getBaseDomain
  • xoops_getConfigOption
  • xoops_getcss
  • xoops_getenv
  • xoops_getHandler
  • xoops_getLinkedUnameFromId
  • xoops_getMailer
  • xoops_getModuleHandler
  • xoops_getModuleOption
  • xoops_getOption
  • xoops_getrank
  • xoops_getUrlDomain
  • xoops_getUserTimestamp
  • xoops_groupperm_deletebymoditem
  • xoops_header
  • xoops_hex2bin
  • xoops_isActiveModule
  • xoops_ishexstr
  • xoops_load
  • xoops_load_lang_file
  • xoops_loadLanguage
  • xoops_local
  • xoops_makepass
  • xoops_message
  • xoops_module_activate
  • xoops_module_change
  • xoops_module_deactivate
  • xoops_module_delayed_clean_cache
  • xoops_module_get_admin_menu
  • xoops_module_gettemplate
  • xoops_module_install
  • xoops_module_install_pm
  • xoops_module_install_profile
  • xoops_module_log_header
  • xoops_module_uninstall
  • xoops_module_update
  • xoops_module_update_pm
  • xoops_module_update_profile
  • xoops_module_update_system
  • xoops_module_write_admin_menu
  • xoops_notification_deletebyitem
  • xoops_notification_deletebymodule
  • xoops_notification_deletebyuser
  • xoops_refcheck
  • xoops_result
  • xoops_setActiveModules
  • xoops_setConfigOption
  • xoops_substr
  • xoops_template_clear_module_cache
  • xoops_template_touch
  • xoops_trim
  • xoops_utf8_encode
  • xoops_write_index_file
  • xoopsCodeTarea
  • xoopseditor_get_rootpath
  • XoopsErrorHandler_HandleError
  • xoopsfwrite
  • xoopsSmilies
  • xoPassField
  • xoPhpVersion
  • xoPutLicenseKey
  • xoStripeKey
  • Overview
  • Namespace
  • Class
  • Tree

Class PHPMailer

PHPMailer - PHP email creation and transport class.

Direct known subclasses

PHPMailerOAuth, XoopsMultiMailer
Package: PHPMailer
Copyright: 2012 - 2014 Marcus Bointon
Copyright: 2010 - 2012 Jim Jagielski
Copyright: 2004 - 2009 Andy Prevost
License: GNU Lesser General Public License
Author: Marcus Bointon (Synchro/coolbru) phpmailer@synchromedia.co.uk
Author: Jim Jagielski (jimjag) jimjag@gmail.com
Author: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net
Author: Brent R. Matzelle (original founder)
Located at lass/mail/phpmailer/class.phpmailer.php
Methods summary
public
# __construct( boolean $exceptions = null )

Constructor.

Constructor.

Parameters

$exceptions
Should we throw external exceptions?
public
# __destruct( )

Destructor.

Destructor.

protected
# edebug( string $str )

Output debugging info via user-defined method. Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).

Output debugging info via user-defined method. Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).

Parameters

$str

See

PHPMailer::$Debugoutput
PHPMailer::$SMTPDebug
public
# isHTML( boolean $isHtml = true )

Sets message type to HTML or plain.

Sets message type to HTML or plain.

Parameters

$isHtml
True for HTML mode.
public
# isSMTP( )

Send messages using SMTP.

Send messages using SMTP.

public
# isMail( )

Send messages using PHP's mail() function.

Send messages using PHP's mail() function.

public
# isSendmail( )

Send messages using $Sendmail.

Send messages using $Sendmail.

public
# isQmail( )

Send messages using qmail.

Send messages using qmail.

public boolean
# addAddress( string $address, string $name = '' )

Add a "To" address.

Add a "To" address.

Parameters

$address
The email address to send to
$name

Returns

boolean
true on success, false if address already used or invalid in some way
public boolean
# addCC( string $address, string $name = '' )

Add a "CC" address.

Add a "CC" address.

Parameters

$address
The email address to send to
$name

Returns

boolean
true on success, false if address already used or invalid in some way

Note:

This function works with the SMTP mailer on win32, not with the "mail" mailer.
public boolean
# addBCC( string $address, string $name = '' )

Add a "BCC" address.

Add a "BCC" address.

Parameters

$address
The email address to send to
$name

Returns

boolean
true on success, false if address already used or invalid in some way

Note:

This function works with the SMTP mailer on win32, not with the "mail" mailer.
public boolean
# addReplyTo( string $address, string $name = '' )

Add a "Reply-To" address.

Add a "Reply-To" address.

Parameters

$address
The email address to reply to
$name

Returns

boolean
true on success, false if address already used or invalid in some way
protected boolean
# addOrEnqueueAnAddress( string $kind, string $address, string $name )

Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such addresses is delayed until send(). Addresses that have been added already return false, but do not throw exceptions.

Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such addresses is delayed until send(). Addresses that have been added already return false, but do not throw exceptions.

Parameters

$kind
One of 'to', 'cc', 'bcc', or 'ReplyTo'
$address
The email address to send, resp. to reply to
$name

Returns

boolean
true on success, false if address already used or invalid in some way

Throws

phpmailerException
protected boolean
# addAnAddress( string $kind, string $address, string $name = '' )

Add an address to one of the recipient arrays or to the ReplyTo array. Addresses that have been added already return false, but do not throw exceptions.

Add an address to one of the recipient arrays or to the ReplyTo array. Addresses that have been added already return false, but do not throw exceptions.

Parameters

$kind
One of 'to', 'cc', 'bcc', or 'ReplyTo'
$address
The email address to send, resp. to reply to
$name

Returns

boolean
true on success, false if address already used or invalid in some way

Throws

phpmailerException
public array
# parseAddresses( string $addrstr, boolean $useimap = true )

Parse and validate a string containing one or more RFC822-style comma-separated email addresses of the form "display name

<

address>" into an array of name/address pairs. Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. Note that quotes in the name part are removed.

Parse and validate a string containing one or more RFC822-style comma-separated email addresses of the form "display name

<

address>" into an array of name/address pairs. Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. Note that quotes in the name part are removed.

Parameters

$addrstr
The address list string
$useimap
Whether to use the IMAP extension to parse the list

Returns

array

Link

A more careful implementation
public boolean
# setFrom( string $address, string $name = '', boolean $auto = true )

Set the From and FromName properties.

Set the From and FromName properties.

Parameters

$address
$name
$auto
Whether to also set the Sender address, defaults to true

Returns

boolean

Throws

phpmailerException
public string
# getLastMessageID( )

Return the Message-ID header of the last email. Technically this is the value from the last time the headers were created, but it's also the message ID of the last sent message except in pathological cases.

Return the Message-ID header of the last email. Technically this is the value from the last time the headers were created, but it's also the message ID of the last sent message except in pathological cases.

Returns

string
public static boolean
# validateAddress( string $address, string|callable $patternselect = null )

Check that a string looks like an email address.

Check that a string looks like an email address.

Parameters

$address
The email address to check
$patternselect

A selector for the validation pattern to use : * auto Pick best pattern automatically; * pcre8 Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; * pcre Use old PCRE implementation; * php Use PHP built-in FILTER_VALIDATE_EMAIL; * html5 Use the pattern given by the HTML5 spec for 'email' type form input elements. * noregex Don't use a regex: super fast, really dumb. Alternatively you may pass in a callable to inject your own validator, for example: PHPMailer::validateAddress('user@example.com', function($address) { return (strpos($address, '@') !== false); }); You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.

Returns

boolean
public boolean
# idnSupported( )

Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the "intl" and "mbstring" PHP extensions.

Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the "intl" and "mbstring" PHP extensions.

Returns

boolean
"true" if required functions for IDN support are present
public string
# punyencodeAddress( string $address )

Converts IDN in given email address to its ASCII form, also known as punycode, if possible. Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. This function silently returns unmodified address if: - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) - Conversion to punycode is impossible (e.g. required PHP functions are not available) or fails for any reason (e.g. domain has characters not allowed in an IDN)

Converts IDN in given email address to its ASCII form, also known as punycode, if possible. Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. This function silently returns unmodified address if: - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) - Conversion to punycode is impossible (e.g. required PHP functions are not available) or fails for any reason (e.g. domain has characters not allowed in an IDN)

Parameters

$address
The email address to convert

Returns

string
The encoded address in ASCII form

See

PHPMailer::$CharSet
public boolean
# send( )

Create a message and send it. Uses the sending method specified by $Mailer.

Create a message and send it. Uses the sending method specified by $Mailer.

Returns

boolean
false on error - See the ErrorInfo property for details of the error.

Throws

phpmailerException
public boolean
# preSend( )

Prepare a message for sending.

Prepare a message for sending.

Returns

boolean

Throws

phpmailerException
public boolean
# postSend( )

Actually send a message. Send the email via the selected mechanism

Actually send a message. Send the email via the selected mechanism

Returns

boolean

Throws

phpmailerException
protected boolean
# sendmailSend( string $header, string $body )

Send mail using the $Sendmail program.

Send mail using the $Sendmail program.

Parameters

$header
The message headers
$body
The message body

Returns

boolean

Throws

phpmailerException

See

PHPMailer::$Sendmail
protected static boolean
# isShellSafe( string $string )

Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.

Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.

Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.

Parameters

$string
The string to be validated

Returns

boolean

See

https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
protected boolean
# mailSend( string $header, string $body )

Send mail using the PHP mail() function.

Send mail using the PHP mail() function.

Parameters

$header
The message headers
$body
The message body

Returns

boolean

Throws

phpmailerException

Link

http://www.php.net/manual/en/book.mail.php
public SMTP
# getSMTPInstance( )

Get an instance to use for SMTP operations. Override this function to load your own SMTP implementation

Get an instance to use for SMTP operations. Override this function to load your own SMTP implementation

Returns

SMTP
protected boolean
# smtpSend( string $header, string $body )

Send mail via SMTP. Returns false if there is a bad MAIL FROM, RCPT, or DATA input. Uses the PHPMailerSMTP class by default.

Send mail via SMTP. Returns false if there is a bad MAIL FROM, RCPT, or DATA input. Uses the PHPMailerSMTP class by default.

Parameters

$header
The message headers
$body
The message body

Returns

boolean

Throws

phpmailerException

See

PHPMailer::getSMTPInstance() to use a different class.

Uses

SMTP
public boolean
# smtpConnect( array $options = null )

Initiate a connection to an SMTP server. Returns false if the operation failed.

Initiate a connection to an SMTP server. Returns false if the operation failed.

Parameters

$options
An array of options compatible with stream_context_create()

Returns

boolean

Throws

phpmailerException

Uses

SMTP
public
# smtpClose( )

Close the active SMTP session if one exists.

Close the active SMTP session if one exists.

public boolean
# setLanguage( string $langcode = 'en', string $lang_path = '' )

Set the language for error messages. Returns false if it cannot load the language file. The default language is English.

Set the language for error messages. Returns false if it cannot load the language file. The default language is English.

Parameters

$langcode
ISO 639-1 2-character language code (e.g. French is "fr")
$lang_path
Path to the language file directory, with trailing separator (slash)

Returns

boolean
public array
# getTranslations( )

Get the array of strings for the current language.

Get the array of strings for the current language.

Returns

array
public string
# addrAppend( string $type, array $addr )

Create recipient headers.

Create recipient headers.

Parameters

$type
$addr

An array of recipient, where each recipient is a 2-element indexed array with element 0 containing an address and element 1 containing a name, like: array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User'))

Returns

string
public string
# addrFormat( array $addr )

Format an address for use in a message header.

Format an address for use in a message header.

Parameters

$addr

A 2-element indexed array, element 0 containing an address, element 1 containing a name like array('joe@example.com', 'Joe User')

Returns

string
public string
# wrapText( string $message, integer $length, boolean $qp_mode = false )

Word-wrap message. For use with mailers that do not automatically perform wrapping and for quoted-printable encoded messages. Original written by philippe.

Word-wrap message. For use with mailers that do not automatically perform wrapping and for quoted-printable encoded messages. Original written by philippe.

Parameters

$message
The message to wrap
$length
The line length to wrap to
$qp_mode
Whether to run in Quoted-Printable mode

Returns

string
public integer
# utf8CharBoundary( string $encodedText, integer $maxLength )

Find the last character boundary prior to $maxLength in a utf-8 quoted-printable encoded string. Original written by Colin Brown.

Find the last character boundary prior to $maxLength in a utf-8 quoted-printable encoded string. Original written by Colin Brown.

Parameters

$encodedText
utf-8 QP text
$maxLength
Find the last character boundary prior to this length

Returns

integer
public
# setWordWrap( )

Apply word wrapping to the message body. Wraps the message body to the number of chars set in the WordWrap property. You should only do this to plain-text bodies as wrapping HTML tags may break them. This is called automatically by createBody(), so you don't need to call it yourself.

Apply word wrapping to the message body. Wraps the message body to the number of chars set in the WordWrap property. You should only do this to plain-text bodies as wrapping HTML tags may break them. This is called automatically by createBody(), so you don't need to call it yourself.

public string
# createHeader( )

Assemble message headers.

Assemble message headers.

Returns

string
The assembled headers
public string
# getMailMIME( )

Get the message MIME type headers.

Get the message MIME type headers.

Returns

string
public string
# getSentMIMEMessage( )

Returns the whole MIME message. Includes complete headers and body. Only valid post preSend().

Returns the whole MIME message. Includes complete headers and body. Only valid post preSend().

Returns

string

See

PHPMailer::preSend()
protected string
# generateId( )

Create unique ID

Create unique ID

Returns

string
public string
# createBody( )

Assemble the message body. Returns an empty string on failure.

Assemble the message body. Returns an empty string on failure.

Returns

string
The assembled message body

Throws

phpmailerException
protected string
# getBoundary( string $boundary, string $charSet, string $contentType, string $encoding )

Return the start of a message boundary.

Return the start of a message boundary.

Parameters

$boundary
$charSet
$contentType
$encoding

Returns

string
protected string
# endBoundary( string $boundary )

Return the end of a message boundary.

Return the end of a message boundary.

Parameters

$boundary

Returns

string
protected
# setMessageType( )

Set the message type. PHPMailer only supports some preset message types, not arbitrary MIME structures.

Set the message type. PHPMailer only supports some preset message types, not arbitrary MIME structures.

public string
# headerLine( string $name, string $value )

Format a header line.

Format a header line.

Parameters

$name
$value

Returns

string
public string
# textLine( string $value )

Return a formatted mail line.

Return a formatted mail line.

Parameters

$value

Returns

string
public boolean
# addAttachment( string $path, string $name = '', string $encoding = 'base64', string $type = '', string $disposition = 'attachment' )

Add an attachment from a path on the filesystem. Returns false if the file could not be found or read.

Add an attachment from a path on the filesystem. Returns false if the file could not be found or read.

Parameters

$path
Path to the attachment.
$name
Overrides the attachment name.
$encoding
File encoding (see $Encoding).
$type
File extension (MIME) type.
$disposition
Disposition to use

Returns

boolean

Throws

phpmailerException
public array
# getAttachments( )

Return the array of attachments.

Return the array of attachments.

Returns

array
protected string
# attachAll( string $disposition_type, string $boundary )

Attach all file, string, and binary attachments to the message. Returns an empty string on failure.

Attach all file, string, and binary attachments to the message. Returns an empty string on failure.

Parameters

$disposition_type
$boundary

Returns

string
protected string
# encodeFile( string $path, string $encoding = 'base64' )

Encode a file attachment in requested format. Returns an empty string on failure.

Encode a file attachment in requested format. Returns an empty string on failure.

Parameters

$path
The full path to the file
$encoding
The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'

Returns

string

Throws

phpmailerException
public string
# encodeString( string $str, string $encoding = 'base64' )

Encode a string in requested format. Returns an empty string on failure.

Encode a string in requested format. Returns an empty string on failure.

Parameters

$str
The text to encode
$encoding
The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'

Returns

string
public string
# encodeHeader( string $str, string $position = 'text' )

Encode a header string optimally. Picks shortest of Q, B, quoted-printable or none.

Encode a header string optimally. Picks shortest of Q, B, quoted-printable or none.

Parameters

$str
$position

Returns

string
public boolean
# hasMultiBytes( string $str )

Check if a string contains multi-byte characters.

Check if a string contains multi-byte characters.

Parameters

$str
multi-byte text to wrap encode

Returns

boolean
public boolean
# has8bitChars( string $text )

Does a string contain any 8-bit chars (in any charset)?

Does a string contain any 8-bit chars (in any charset)?

Parameters

$text

Returns

boolean
public string
# base64EncodeWrapMB( string $str, string $linebreak = null )

Encode and wrap long multibyte strings for mail headers without breaking lines within a character. Adapted from a function by paravoid

Encode and wrap long multibyte strings for mail headers without breaking lines within a character. Adapted from a function by paravoid

Parameters

$str
multi-byte text to wrap encode
$linebreak
string to use as linefeed/end-of-line

Returns

string

Link

http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
public string
# encodeQP( string $string, integer $line_max = 76 )

Encode a string in quoted-printable format. According to RFC2045 section 6.7.

Encode a string in quoted-printable format. According to RFC2045 section 6.7.

Parameters

$string
The text to encode
$line_max
Number of chars allowed on a line before wrapping

Returns

string

Link

Adapted from this comment
public string
# encodeQPphp( string $string, integer $line_max = 76, boolean $space_conv = false )

Backward compatibility wrapper for an old QP encoding function that was removed.

Backward compatibility wrapper for an old QP encoding function that was removed.

Deprecated

Use encodeQP instead.

Parameters

$string
$line_max
$space_conv

Returns

string

See

PHPMailer::encodeQP()
public string
# encodeQ( string $str, string $position = 'text' )

Encode a string using Q encoding.

Encode a string using Q encoding.

Parameters

$str
the text to encode
$position
Where the text is going to be used, see the RFC for what that means

Returns

string

Link

http://tools.ietf.org/html/rfc2047
public
# addStringAttachment( string $string, string $filename, string $encoding = 'base64', string $type = '', string $disposition = 'attachment' )

Add a string or binary attachment (non-filesystem). This method can be used to attach ascii or binary data, such as a BLOB record from a database.

Add a string or binary attachment (non-filesystem). This method can be used to attach ascii or binary data, such as a BLOB record from a database.

Parameters

$string
String attachment data.
$filename
Name of the attachment.
$encoding
File encoding (see $Encoding).
$type
File extension (MIME) type.
$disposition
Disposition to use
public boolean
# addEmbeddedImage( string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = '', string $disposition = 'inline' )

Add an embedded (inline) attachment from a file. This can include images, sounds, and just about any other document type. These differ from 'regular' attachments in that they are intended to be displayed inline with the message, not just attached for download. This is used in HTML messages that embed the images the HTML refers to using the $cid value.

Add an embedded (inline) attachment from a file. This can include images, sounds, and just about any other document type. These differ from 'regular' attachments in that they are intended to be displayed inline with the message, not just attached for download. This is used in HTML messages that embed the images the HTML refers to using the $cid value.

Parameters

$path
Path to the attachment.
$cid

Content ID of the attachment; Use this to reference the content when using an embedded image in HTML.

$name
Overrides the attachment name.
$encoding
File encoding (see $Encoding).
$type
File MIME type.
$disposition
Disposition to use

Returns

boolean
True on successfully adding an attachment
public boolean
# addStringEmbeddedImage( string $string, string $cid, string $name = '', string $encoding = 'base64', string $type = '', string $disposition = 'inline' )

Add an embedded stringified attachment. This can include images, sounds, and just about any other document type. Be sure to set the $type to an image type for images: JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.

Add an embedded stringified attachment. This can include images, sounds, and just about any other document type. Be sure to set the $type to an image type for images: JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.

Parameters

$string
The attachment binary data.
$cid

Content ID of the attachment; Use this to reference the content when using an embedded image in HTML.

$name
$encoding
File encoding (see $Encoding).
$type
MIME type.
$disposition
Disposition to use

Returns

boolean
True on successfully adding an attachment
public boolean
# inlineImageExists( )

Check if an inline attachment is present.

Check if an inline attachment is present.

Returns

boolean
public boolean
# attachmentExists( )

Check if an attachment (non-inline) is present.

Check if an attachment (non-inline) is present.

Returns

boolean
public boolean
# alternativeExists( )

Check if this message has an alternative body set.

Check if this message has an alternative body set.

Returns

boolean
public
# clearQueuedAddresses( string $kind )

Clear queued addresses of given kind.

Clear queued addresses of given kind.

Parameters

$kind
'to', 'cc', or 'bcc'
public
# clearAddresses( )

Clear all To recipients.

Clear all To recipients.

public
# clearCCs( )

Clear all CC recipients.

Clear all CC recipients.

public
# clearBCCs( )

Clear all BCC recipients.

Clear all BCC recipients.

public
# clearReplyTos( )

Clear all ReplyTo recipients.

Clear all ReplyTo recipients.

public
# clearAllRecipients( )

Clear all recipient types.

Clear all recipient types.

public
# clearAttachments( )

Clear all filesystem, string, and binary attachments.

Clear all filesystem, string, and binary attachments.

public
# clearCustomHeaders( )

Clear all custom headers.

Clear all custom headers.

protected
# setError( string $msg )

Add an error message to the error container.

Add an error message to the error container.

Parameters

$msg
public static string
# rfcDate( )

Return an RFC 822 formatted date.

Return an RFC 822 formatted date.

Returns

string
protected string
# serverHostname( )

Get the server hostname. Returns 'localhost.localdomain' if unknown.

Get the server hostname. Returns 'localhost.localdomain' if unknown.

Returns

string
protected string
# lang( string $key )

Get an error message in the current language.

Get an error message in the current language.

Parameters

$key

Returns

string
public boolean
# isError( )

Check if an error occurred.

Check if an error occurred.

Returns

boolean
True if an error did occur.
public string
# fixEOL( string $str )

Ensure consistent line endings in a string. Changes every end of line from CRLF, CR or LF to $this->LE.

Ensure consistent line endings in a string. Changes every end of line from CRLF, CR or LF to $this->LE.

Parameters

$str
String to fixEOL

Returns

string
public
# addCustomHeader( string $name, string $value = null )

Add a custom header. $name value can be overloaded to contain both header name and value (name:value)

Add a custom header. $name value can be overloaded to contain both header name and value (name:value)

Parameters

$name
Custom header name
$value
Header value
public array
# getCustomHeaders( )

Returns all custom headers.

Returns all custom headers.

Returns

array
public string
# msgHTML( string $message, string $basedir = '', boolean|callable $advanced = false )

Create a message body from an HTML string. Automatically inlines images and creates a plain-text version by converting the HTML, overwriting any existing values in Body and AltBody. $basedir is used when handling relative image paths, e.g. will look for an image file in $basedir/images/a.png and convert it to inline. If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.

Create a message body from an HTML string. Automatically inlines images and creates a plain-text version by converting the HTML, overwriting any existing values in Body and AltBody. $basedir is used when handling relative image paths, e.g. will look for an image file in $basedir/images/a.png and convert it to inline. If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.

Parameters

$message
HTML message string
$basedir
base directory for relative paths to images
$advanced

Whether to use the internal HTML to text converter or your own custom converter @see PHPMailer::html2text()

Returns

string
$message The transformed message Body
public string
# html2text( string $html, boolean|callable $advanced = false )

Convert an HTML string into plain text. This is used by msgHTML(). Note - older versions of this function used a bundled advanced converter which was been removed for license reasons in #232. Example usage:

// Use default conversion
$plain = $mail->html2text($html);
// Use your own custom converter
$plain = $mail->html2text($html, function($html) {
    $converter = new MyHtml2text($html);
    return $converter->get_text();
});

Convert an HTML string into plain text. This is used by msgHTML(). Note - older versions of this function used a bundled advanced converter which was been removed for license reasons in #232. Example usage:

// Use default conversion
$plain = $mail->html2text($html);
// Use your own custom converter
$plain = $mail->html2text($html, function($html) {
    $converter = new MyHtml2text($html);
    return $converter->get_text();
});

Parameters

$html
The HTML text to convert
$advanced

Any boolean value to use the internal converter, or provide your own callable for custom conversion.

Returns

string
public static string
# _mime_types( string $ext = '' )

Get the MIME type for a file extension.

Get the MIME type for a file extension.

Parameters

$ext
File extension

Returns

string
MIME type of file.
public static string
# filenameToType( string $filename )

Map a file name to a MIME type. Defaults to 'application/octet-stream', i.e.. arbitrary binary data.

Map a file name to a MIME type. Defaults to 'application/octet-stream', i.e.. arbitrary binary data.

Parameters

$filename
A file name or full path, does not need to exist as a file

Returns

string
public static string|array
# mb_pathinfo( string $path, integer|string $options = null )

Multi-byte-safe pathinfo replacement. Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. Works similarly to the one in PHP >= 5.2.0

Multi-byte-safe pathinfo replacement. Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. Works similarly to the one in PHP >= 5.2.0

Parameters

$path
A filename or path, does not need to exist as a file
$options

Either a PATHINFO_* constant, or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2

Returns

string|array

Link

http://www.php.net/manual/en/function.pathinfo.php#107461
public boolean
# set( string $name, mixed $value = '' )

Set or reset instance properties. You should avoid this function - it's more verbose, less efficient, more error-prone and harder to debug than setting properties directly. Usage Example: $mail->set('SMTPSecure', 'tls'); is the same as: $mail->SMTPSecure = 'tls';

Set or reset instance properties. You should avoid this function - it's more verbose, less efficient, more error-prone and harder to debug than setting properties directly. Usage Example: $mail->set('SMTPSecure', 'tls'); is the same as: $mail->SMTPSecure = 'tls';

Parameters

$name
The property name to set
$value
The value to set the property to

Returns

boolean
public string
# secureHeader( string $str )

Strip newlines to prevent header injection.

Strip newlines to prevent header injection.

Parameters

$str

Returns

string
public static string
# normalizeBreaks( string $text, string $breaktype = "\r\n" )

Normalize line breaks in a string. Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. Defaults to CRLF (for message bodies) and preserves consecutive breaks.

Normalize line breaks in a string. Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. Defaults to CRLF (for message bodies) and preserves consecutive breaks.

Parameters

$text
$breaktype
What kind of line break to use, defaults to CRLF

Returns

string
public
# sign( string $cert_filename, string $key_filename, string $key_pass, string $extracerts_filename = '' )

Set the public and private key files and password for S/MIME signing.

Set the public and private key files and password for S/MIME signing.

Parameters

$cert_filename
$key_filename
$key_pass
Password for private key
$extracerts_filename
Optional path to chain certificate
public string
# DKIM_QP( string $txt )

Quoted-Printable-encode a DKIM header.

Quoted-Printable-encode a DKIM header.

Parameters

$txt

Returns

string
public string
# DKIM_Sign( string $signHeader )

Generate a DKIM signature.

Generate a DKIM signature.

Parameters

$signHeader

Returns

string
The DKIM signature value

Throws

phpmailerException
public string
# DKIM_HeaderC( string $signHeader )

Generate a DKIM canonicalization header.

Generate a DKIM canonicalization header.

Parameters

$signHeader
Header

Returns

string
public string
# DKIM_BodyC( string $body )

Generate a DKIM canonicalization body.

Generate a DKIM canonicalization body.

Parameters

$body
Message Body

Returns

string
public string
# DKIM_Add( string $headers_line, string $subject, string $body )

Create the DKIM header and body in a new message header.

Create the DKIM header and body in a new message header.

Parameters

$headers_line
Header lines
$subject
Subject
$body
Body

Returns

string
public static boolean
# hasLineLongerThanMax( string $str )

Detect if a string contains a line longer than the maximum line length allowed.

Detect if a string contains a line longer than the maximum line length allowed.

Parameters

$str

Returns

boolean
public array
# getToAddresses( )

Allows for public read access to 'to' property.

Allows for public read access to 'to' property.

Returns

array

Note:

Before the send() call, queued addresses (i.e. with IDN) are not yet included.
public array
# getCcAddresses( )

Allows for public read access to 'cc' property.

Allows for public read access to 'cc' property.

Returns

array

Note:

Before the send() call, queued addresses (i.e. with IDN) are not yet included.
public array
# getBccAddresses( )

Allows for public read access to 'bcc' property.

Allows for public read access to 'bcc' property.

Returns

array

Note:

Before the send() call, queued addresses (i.e. with IDN) are not yet included.
public array
# getReplyToAddresses( )

Allows for public read access to 'ReplyTo' property.

Allows for public read access to 'ReplyTo' property.

Returns

array

Note:

Before the send() call, queued addresses (i.e. with IDN) are not yet included.
public array
# getAllRecipientAddresses( )

Allows for public read access to 'all_recipients' property.

Allows for public read access to 'all_recipients' property.

Returns

array

Note:

Before the send() call, queued addresses (i.e. with IDN) are not yet included.
protected
# doCallback( boolean $isSent, array $to, array $cc, array $bcc, string $subject, string $body, string $from )

Perform a callback.

Perform a callback.

Parameters

$isSent
$to
$cc
$bcc
$subject
$body
$from
Constants summary
integer STOP_MESSAGE

Error severity: message only, continue processing.

Error severity: message only, continue processing.

# 0
integer STOP_CONTINUE

Error severity: message, likely ok to continue processing.

Error severity: message, likely ok to continue processing.

# 1
integer STOP_CRITICAL

Error severity: message, plus full stop, critical error reached.

Error severity: message, plus full stop, critical error reached.

# 2
string CRLF

SMTP RFC standard line ending.

SMTP RFC standard line ending.

# "\r\n"
integer MAX_LINE_LENGTH

The maximum line length allowed by RFC 2822 section 2.1.1

The maximum line length allowed by RFC 2822 section 2.1.1

# 998
Properties summary
public string $Version

The PHPMailer Version number.

The PHPMailer Version number.

# '5.2.21'
public integer $Priority

Email priority. Options: null (default), 1 = High, 3 = Normal, 5 = low. When null, the header is not set at all.

Email priority. Options: null (default), 1 = High, 3 = Normal, 5 = low. When null, the header is not set at all.

# null
public string $CharSet

The character set of the message.

The character set of the message.

# 'iso-8859-1'
public string $ContentType

The MIME Content-type of the message.

The MIME Content-type of the message.

# 'text/plain'
public string $Encoding

The message encoding. Options: "8bit", "7bit", "binary", "base64", and "quoted-printable".

The message encoding. Options: "8bit", "7bit", "binary", "base64", and "quoted-printable".

# '8bit'
public string $ErrorInfo

Holds the most recent mailer error message.

Holds the most recent mailer error message.

# ''
public string $From

The From email address for the message.

The From email address for the message.

# 'root@localhost'
public string $FromName

The From name of the message.

The From name of the message.

# 'Root User'
public string $Sender

The Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.

The Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.

# ''
public string $ReturnPath

The Return-Path of the message. If empty, it will be set to either From or Sender.

The Return-Path of the message. If empty, it will be set to either From or Sender.

Deprecated

Email senders should never set a return-path header; it's the receiver's job (RFC5321 section 4.4), so this no longer does anything.


Link

RFC5321 reference
# ''
public string $Subject

The Subject of the message.

The Subject of the message.

# ''
public string $Body

An HTML or plain text message body. If HTML then call isHTML(true).

An HTML or plain text message body. If HTML then call isHTML(true).

# ''
public string $AltBody

The plain-text message body. This body can be read by mail clients that do not have HTML email capability such as mutt & Eudora. Clients that can read HTML will view the normal Body.

The plain-text message body. This body can be read by mail clients that do not have HTML email capability such as mutt & Eudora. Clients that can read HTML will view the normal Body.

# ''
public string $Ical

An iCal message part body. Only supported in simple alt or alt_inline message types To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator

An iCal message part body. Only supported in simple alt or alt_inline message types To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator

Link

http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/
http://kigkonsult.se/iCalcreator/
# ''
protected string $MIMEBody

The complete compiled MIME message body.

The complete compiled MIME message body.

# ''
protected string $MIMEHeader

The complete compiled MIME message headers.

The complete compiled MIME message headers.

# ''
protected string $mailHeader

Extra headers that createHeader() doesn't fold in.

Extra headers that createHeader() doesn't fold in.

# ''
public integer $WordWrap

Word-wrap the message body to this number of chars. Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.

Word-wrap the message body to this number of chars. Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.

# 0
public string $Mailer

Which method to use to send mail. Options: "mail", "sendmail", or "smtp".

Which method to use to send mail. Options: "mail", "sendmail", or "smtp".

# 'mail'
public string $Sendmail

The path to the sendmail program.

The path to the sendmail program.

# '/usr/sbin/sendmail'
public boolean $UseSendmailOptions

Whether mail() uses a fully sendmail-compatible MTA. One which supports sendmail's "-oi -f" options.

Whether mail() uses a fully sendmail-compatible MTA. One which supports sendmail's "-oi -f" options.

# true
public string $PluginDir

Path to PHPMailer plugins. Useful if the SMTP class is not in the PHP include path.

Path to PHPMailer plugins. Useful if the SMTP class is not in the PHP include path.

Deprecated

Should not be needed now there is an autoloader.
# ''
public string $ConfirmReadingTo

The email address that a reading confirmation should be sent to, also known as read receipt.

The email address that a reading confirmation should be sent to, also known as read receipt.

# ''
public string $Hostname

The hostname to use in the Message-ID header and as default HELO string. If empty, PHPMailer attempts to find one with, in order, $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value 'localhost.localdomain'.

The hostname to use in the Message-ID header and as default HELO string. If empty, PHPMailer attempts to find one with, in order, $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value 'localhost.localdomain'.

# ''
public string $MessageID

An ID to be used in the Message-ID header. If empty, a unique id will be generated. You can set your own, but it must be in the format "<id@domain>", as defined in RFC5322 section 3.6.4 or it will be ignored.

An ID to be used in the Message-ID header. If empty, a unique id will be generated. You can set your own, but it must be in the format "<id@domain>", as defined in RFC5322 section 3.6.4 or it will be ignored.

See

https://tools.ietf.org/html/rfc5322#section-3.6.4
# ''
public string $MessageDate

The message Date to be used in the Date header. If empty, the current date will be added.

The message Date to be used in the Date header. If empty, the current date will be added.

# ''
public string $Host

SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). You can also specify encryption type, for example: (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). Hosts will be tried in order.

SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). You can also specify encryption type, for example: (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). Hosts will be tried in order.

# 'localhost'
public integer $Port

The default SMTP server port.

The default SMTP server port.

# 25
public string $Helo

The SMTP HELO of the message. Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find one with the same method described above for $Hostname.

The SMTP HELO of the message. Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find one with the same method described above for $Hostname.

See

PHPMailer::$Hostname
# ''
public string $SMTPSecure

What kind of encryption to use on the SMTP connection. Options: '', 'ssl' or 'tls'

What kind of encryption to use on the SMTP connection. Options: '', 'ssl' or 'tls'

# ''
public boolean $SMTPAutoTLS

Whether to enable TLS encryption automatically if a server supports it, even if SMTPSecure is not set to 'tls'. Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.

Whether to enable TLS encryption automatically if a server supports it, even if SMTPSecure is not set to 'tls'. Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.

# true
public boolean $SMTPAuth

Whether to use SMTP authentication. Uses the Username and Password properties.

Whether to use SMTP authentication. Uses the Username and Password properties.

See

PHPMailer::$Username
PHPMailer::$Password
# false
public array $SMTPOptions

Options array passed to stream_context_create when connecting via SMTP.

Options array passed to stream_context_create when connecting via SMTP.

# array()
public string $Username

SMTP username.

SMTP username.

# ''
public string $Password

SMTP password.

SMTP password.

# ''
public string $AuthType

SMTP auth type. Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified

SMTP auth type. Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified

# ''
public string $Realm

SMTP realm. Used for NTLM auth

SMTP realm. Used for NTLM auth

# ''
public string $Workstation

SMTP workstation. Used for NTLM auth

SMTP workstation. Used for NTLM auth

# ''
public integer $Timeout

The SMTP server timeout in seconds. Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2

The SMTP server timeout in seconds. Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2

# 300
public integer $SMTPDebug

SMTP class debug output mode. Debug output level. Options: * 0 No output * 1 Commands * 2 Data and commands * 3 As 2 plus connection status * 4 Low-level data output

SMTP class debug output mode. Debug output level. Options: * 0 No output * 1 Commands * 2 Data and commands * 3 As 2 plus connection status * 4 Low-level data output

See

SMTP::$do_debug
# 0
public string|callable $Debugoutput

How to handle debug output. Options: * echo Output plain-text as-is, appropriate for CLI * html Output escaped, line breaks converted to <br>, appropriate for browser output * error_log Output to error log as configured in php.ini

How to handle debug output. Options: * echo Output plain-text as-is, appropriate for CLI * html Output escaped, line breaks converted to <br>, appropriate for browser output * error_log Output to error log as configured in php.ini

Alternatively, you can provide a callable expecting two params: a message string and the debug level:

$mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};

See

SMTP::$Debugoutput
# 'echo'
public boolean $SMTPKeepAlive

Whether to keep SMTP connection open after each message. If this is set to true then to close the connection requires an explicit call to smtpClose().

Whether to keep SMTP connection open after each message. If this is set to true then to close the connection requires an explicit call to smtpClose().

# false
public boolean $SingleTo

Whether to split multiple to addresses into multiple messages or send them all in one message. Only supported in mail and sendmail transports, not in SMTP.

Whether to split multiple to addresses into multiple messages or send them all in one message. Only supported in mail and sendmail transports, not in SMTP.

# false
public array $SingleToArray

Storage for addresses when SingleTo is enabled.

Storage for addresses when SingleTo is enabled.

# array()
public boolean $do_verp

Whether to generate VERP addresses on send. Only applicable when sending via SMTP.

Whether to generate VERP addresses on send. Only applicable when sending via SMTP.

Link

https://en.wikipedia.org/wiki/Variable_envelope_return_path
Postfix VERP info
# false
public boolean $AllowEmpty

Whether to allow sending messages with an empty body.

Whether to allow sending messages with an empty body.

# false
public string $LE

The default line ending.

The default line ending.

Note

The default remains "\n". We force CRLF where we know it must be used via self::CRLF.


# "\n"
public string $DKIM_selector

DKIM selector.

DKIM selector.

# ''
public string $DKIM_identity

DKIM Identity. Usually the email address used as the source of the email.

DKIM Identity. Usually the email address used as the source of the email.

# ''
public string $DKIM_passphrase

DKIM passphrase. Used if your key is encrypted.

DKIM passphrase. Used if your key is encrypted.

# ''
public string $DKIM_domain

DKIM signing domain name.

DKIM signing domain name.

Example

'example.com'
# ''
public string $DKIM_private

DKIM private key file path.

DKIM private key file path.

# ''
public string $DKIM_private_string

DKIM private key string. If set, takes precedence over $DKIM_private.

DKIM private key string. If set, takes precedence over $DKIM_private.

# ''
public string $action_function

Callback Action function name.

Callback Action function name.

The function that handles the result of the send email action. It is called out by send() for each email sent.

Value can be any php callable: http://www.php.net/is_callable

Parameters: boolean $result result of the send action string $to email address of the recipient string $cc cc email addresses string $bcc bcc email addresses string $subject the subject string $body the email body string $from email address of sender

# ''
public string $XMailer

What to put in the X-Mailer header. Options: An empty string for PHPMailer default, whitespace for none, or a string to use

What to put in the X-Mailer header. Options: An empty string for PHPMailer default, whitespace for none, or a string to use

# ''
public static string|callable $validator

Which validator to use by default when validating email addresses. May be a callable to inject your own validator, but there are several built-in validators.

Which validator to use by default when validating email addresses. May be a callable to inject your own validator, but there are several built-in validators.

See

PHPMailer::validateAddress()
# 'auto'
protected SMTP $smtp

An instance of the SMTP sender class.

An instance of the SMTP sender class.

# null
protected array $to

The array of 'to' names and addresses.

The array of 'to' names and addresses.

# array()
protected array $cc

The array of 'cc' names and addresses.

The array of 'cc' names and addresses.

# array()
protected array $bcc

The array of 'bcc' names and addresses.

The array of 'bcc' names and addresses.

# array()
protected array $ReplyTo

The array of reply-to names and addresses.

The array of reply-to names and addresses.

# array()
protected array $all_recipients

An array of all kinds of addresses. Includes all of $to, $cc, $bcc

An array of all kinds of addresses. Includes all of $to, $cc, $bcc

See

PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc
# array()
protected array $RecipientsQueue

An array of names and addresses queued for validation. In send(), valid and non duplicate entries are moved to $all_recipients and one of $to, $cc, or $bcc. This array is used only for addresses with IDN.

An array of names and addresses queued for validation. In send(), valid and non duplicate entries are moved to $all_recipients and one of $to, $cc, or $bcc. This array is used only for addresses with IDN.

See

PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc
PHPMailer::$all_recipients
# array()
protected array $ReplyToQueue

An array of reply-to names and addresses queued for validation. In send(), valid and non duplicate entries are moved to $ReplyTo. This array is used only for addresses with IDN.

An array of reply-to names and addresses queued for validation. In send(), valid and non duplicate entries are moved to $ReplyTo. This array is used only for addresses with IDN.

See

PHPMailer::$ReplyTo
# array()
protected array $attachment

The array of attachments.

The array of attachments.

# array()
protected array $CustomHeader

The array of custom headers.

The array of custom headers.

# array()
protected string $lastMessageID

The most recent Message-ID (including angular brackets).

The most recent Message-ID (including angular brackets).

# ''
protected string $message_type

The message's MIME type.

The message's MIME type.

# ''
protected array $boundary

The array of MIME boundary strings.

The array of MIME boundary strings.

# array()
protected array $language

The array of available languages.

The array of available languages.

# array()
protected integer $error_count

The number of errors encountered.

The number of errors encountered.

# 0
protected string $sign_cert_file

The S/MIME certificate file path.

The S/MIME certificate file path.

# ''
protected string $sign_key_file

The S/MIME key file path.

The S/MIME key file path.

# ''
protected string $sign_extracerts_file

The optional S/MIME extra certificates ("CA Chain") file path.

The optional S/MIME extra certificates ("CA Chain") file path.

# ''
protected string $sign_key_pass

The S/MIME password for the key. Used only if the key is encrypted.

The S/MIME password for the key. Used only if the key is encrypted.

# ''
protected boolean $exceptions

Whether to throw exceptions for errors.

Whether to throw exceptions for errors.

# false
protected string $uniqueid

Unique ID used for message ID and boundaries.

Unique ID used for message ID and boundaries.

# ''
API documentation generated by ApiGen