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
  • Composer\Autoload\ClassLoader
  • Composer\Autoload\ComposerStaticInit274e5fff219a4f27a346e611b0580d6a
  • ComposerAutoloaderInit274e5fff219a4f27a346e611b0580d6a
  • Config_File
  • Cookie
  • Criteria
  • CriteriaCompo
  • CriteriaElement
  • Database
  • Db_manager
  • ErrorHandler
  • FormDhtmlTextArea
  • FormTextArea
  • Geekwright\RegDom\PublicSuffixList
  • Geekwright\RegDom\RegisteredDomain
  • HTMLPurifier
  • League\OAuth2\Client\Provider\Google
  • 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
  • Xmf\Assert
  • Xmf\Database\Migrate
  • Xmf\Database\TableLoad
  • Xmf\Database\Tables
  • Xmf\Debug
  • Xmf\FilterInput
  • Xmf\Highlighter
  • Xmf\IPAddress
  • Xmf\Jwt\JsonWebToken
  • Xmf\Jwt\KeyFactory
  • Xmf\Jwt\TokenFactory
  • Xmf\Jwt\TokenReader
  • Xmf\Key\ArrayStorage
  • Xmf\Key\Basic
  • Xmf\Key\FileStorage
  • Xmf\Key\KeyAbstract
  • Xmf\Language
  • Xmf\Metagen
  • Xmf\Module\Admin
  • Xmf\Module\Helper
  • Xmf\Module\Helper\AbstractHelper
  • Xmf\Module\Helper\Cache
  • Xmf\Module\Helper\GenericHelper
  • Xmf\Module\Helper\Permission
  • Xmf\Module\Helper\Session
  • Xmf\Random
  • Xmf\Request
  • Xmf\StopWords
  • Xmf\Yaml
  • 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

  • Xmf\Key\StorageInterface
  • 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
  • Composer\Autoload\includeFile
  • 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
  1: <?php
  2: /**
  3:  * XOOPS mailer
  4:  *
  5:  * You may not change or alter any portion of this comment or credits
  6:  * of supporting developers from this source code or any supporting source code
  7:  * which is considered copyrighted (c) material of the original comment or credit authors.
  8:  * This program is distributed in the hope that it will be useful,
  9:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 10:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 11:  *
 12:  * @copyright       (c) 2000-2016 XOOPS Project (www.xoops.org)
 13:  * @license             GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html)
 14:  * @package             kernel
 15:  * @since               2.0.0
 16:  * @author              Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
 17:  * @deprecated          use {@link XoopsMultiMailer} instead.
 18:  */
 19: 
 20: defined('XOOPS_ROOT_PATH') || exit('Restricted access');
 21: 
 22: xoops_loadLanguage('mail');
 23: 
 24: /**
 25:  * The new Multimailer class that will carry out the actual sending and will later replace this class.
 26:  * If you're writing new code, please use that class instead.
 27:  */
 28: include_once $GLOBALS['xoops']->path('class/mail/xoopsmultimailer.php');
 29: 
 30: /**
 31:  * Class for sending mail.
 32:  *
 33:  * Changed to use the facilities of  {@link XoopsMultiMailer}
 34:  *
 35:  * @package    class
 36:  * @subpackage mail
 37:  * @author     Kazumi Ono <onokazu@xoops.org>
 38:  */
 39: class XoopsMailer
 40: {
 41:     /**
 42:      * reference to a {@link XoopsMultiMailer}
 43:      *
 44:      * @var XoopsMultiMailer
 45:      * @access private
 46:      * @since  21.02.2003 14:14:13
 47:      */
 48:     public $multimailer;
 49:     // sender email address
 50:     // private
 51:     public $fromEmail;
 52:     // sender name
 53:     // private
 54:     public $fromName;
 55:     // RMV-NOTIFY
 56:     // sender UID
 57:     // private
 58:     public $fromUser;
 59:     // array of user class objects
 60:     // private
 61:     public $toUsers;
 62:     // array of email addresses
 63:     // private
 64:     public $toEmails;
 65:     // custom headers
 66:     // private
 67:     public $headers;
 68:     // subject of mail
 69:     // private
 70:     public $subject;
 71:     // body of mail
 72:     // private
 73:     public $body;
 74:     // error messages
 75:     // private
 76:     public $errors;
 77:     // messages upon success
 78:     // private
 79:     public $success;
 80:     // private
 81:     public $isMail;
 82:     // private
 83:     public $isPM;
 84:     // private
 85:     public $assignedTags;
 86:     // private
 87:     public $template;
 88:     // private
 89:     public $templatedir;
 90:     // protected
 91:     public $charSet = 'iso-8859-1';
 92:     // protected
 93:     public $encoding = '8bit';
 94: 
 95:     /**
 96:      * Constructor
 97:      *
 98:      * @return XoopsMailer
 99:      */
100:     public function __construct()
101:     {
102:         $this->multimailer = new XoopsMultiMailer();
103:         $this->reset();
104:     }
105: 
106:     /**
107:      * PHP 4 style constructor compatibility shim
108:      *
109:      * @deprecated all callers should be using parent::__construct()
110:      */
111:     public function XoopsMailer()
112:     {
113:         $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
114:         trigger_error("Should call parent::__construct in {$trace[0]['file']} line {$trace[0]['line']},");
115:         self::__construct();
116:     }
117: 
118:     /**
119:      * @param bool $value
120:      */
121:     public function setHTML($value = true)
122:     {
123:         $this->multimailer->isHTML($value);
124:     }
125: 
126:     // public
127:     // reset all properties to default
128:     public function reset()
129:     {
130:         $this->fromEmail    = '';
131:         $this->fromName     = '';
132:         $this->fromUser     = null; // RMV-NOTIFY
133:         $this->priority     = '';
134:         $this->toUsers      = array();
135:         $this->toEmails     = array();
136:         $this->headers      = array();
137:         $this->subject      = '';
138:         $this->body         = '';
139:         $this->errors       = array();
140:         $this->success      = array();
141:         $this->isMail       = false;
142:         $this->isPM         = false;
143:         $this->assignedTags = array();
144:         $this->template     = '';
145:         $this->templatedir  = '';
146:         // Change below to \r\n if you have problem sending mail
147:         $this->LE = "\n";
148:     }
149: 
150:     // public
151:     /**
152:      * @param null $value
153:      */
154:     public function setTemplateDir($value = null)
155:     {
156:         if ($value === null && is_object($GLOBALS['xoopsModule'])) {
157:             $value = $GLOBALS['xoopsModule']->getVar('dirname', 'n');
158:         } else {
159:             $value = str_replace(DIRECTORY_SEPARATOR, '/', $value);
160:         }
161:         $this->templatedir = $value;
162:     }
163: 
164:     // private
165:     /**
166:      * @return bool|string
167:      */
168:     public function getTemplatePath()
169:     {
170:         if (!$path = $this->templatedir) {
171:             $path = XOOPS_ROOT_PATH . '/language/';
172:         } elseif (false === strpos($path, '/')) {
173:             $path = XOOPS_ROOT_PATH . '/modules/' . $path . '/language/';
174:         } elseif (substr($path, -1, 1) !== '/') {
175:             $path .= '/';
176:         }
177:         if (file_exists($path . $GLOBALS['xoopsConfig']['language'] . '/mail_template/' . $this->template)) {
178:             return $path . $GLOBALS['xoopsConfig']['language'] . '/mail_template/' . $this->template;
179:         } elseif (file_exists($path . 'english/mail_template/' . $this->template)) {
180:             return $path . 'english/mail_template/' . $this->template;
181:         } elseif (file_exists($path . $this->template)) {
182:             return $path . $this->template;
183:         } else {
184:             return false;
185:         }
186:     }
187: 
188:     // public
189:     /**
190:      * @param $value
191:      */
192:     public function setTemplate($value)
193:     {
194:         $this->template = $value;
195:     }
196: 
197:     // pupblic
198:     /**
199:      * @param $value
200:      */
201:     public function setFromEmail($value)
202:     {
203:         $this->fromEmail = trim($value);
204:     }
205: 
206:     // public
207:     /**
208:      * @param $value
209:      */
210:     public function setFromName($value)
211:     {
212:         $this->fromName = trim($value);
213:     }
214: 
215:     // RMV-NOTIFY
216:     // public
217:     /**
218:      * @param $user
219:      */
220:     public function setFromUser($user)
221:     {
222:         if (strtolower(get_class($user)) === 'xoopsuser') {
223:             $this->fromUser = &$user;
224:         }
225:     }
226: 
227:     // public
228:     /**
229:      * @param $value
230:      */
231:     public function setPriority($value)
232:     {
233:         $this->priority = trim($value);
234:     }
235: 
236:     // public
237:     /**
238:      * @param $value
239:      */
240:     public function setSubject($value)
241:     {
242:         $this->subject = trim($value);
243:     }
244: 
245:     // public
246:     /**
247:      * @param $value
248:      */
249:     public function setBody($value)
250:     {
251:         $this->body = trim($value);
252:     }
253: 
254:     // public
255:     public function useMail()
256:     {
257:         $this->isMail = true;
258:     }
259: 
260:     // public
261:     public function usePM()
262:     {
263:         $this->isPM = true;
264:     }
265: 
266:     // public
267:     /**
268:      * @param bool $debug
269:      *
270:      * @return bool
271:      */
272:     public function send($debug = false)
273:     {
274:         global $xoopsConfig;
275:         if ($this->body == '' && $this->template == '') {
276:             if ($debug) {
277:                 $this->errors[] = _MAIL_MSGBODY;
278:             }
279: 
280:             return false;
281:         } elseif ($this->template != '') {
282:             $path = $this->getTemplatePath();
283:             if (!($fd = @fopen($path, 'r'))) {
284:                 if ($debug) {
285:                     $this->errors[] = _MAIL_FAILOPTPL;
286:                 }
287: 
288:                 return false;
289:             }
290:             $this->setBody(fread($fd, filesize($path)));
291:         }
292:         // for sending mail only
293:         if ($this->isMail || !empty($this->toEmails)) {
294:             if (!empty($this->priority)) {
295:                 $this->headers[] = 'X-Priority: ' . $this->priority;
296:             }
297:             // $this->headers[] = "X-Mailer: PHP/".phpversion();
298:             // $this->headers[] = "Return-Path: ".$this->fromEmail;
299:             $headers = implode($this->LE, $this->headers);
300:         }
301:         // TODO: we should have an option of no-reply for private messages and emails
302:         // to which we do not accept replies.  e.g. the site admin doesn't want a
303:         // a lot of message from people trying to unsubscribe.  Just make sure to
304:         // give good instructions in the message.
305:         // add some standard tags (user-dependent tags are included later)
306:         global $xoopsConfig;
307: 
308:         $this->assign('X_ADMINMAIL', $xoopsConfig['adminmail']);
309:         $this->assign('X_SITENAME', $xoopsConfig['sitename']);
310:         $this->assign('X_SITEURL', XOOPS_URL . '/');
311:         // TODO: also X_ADMINNAME??
312:         // TODO: X_SIGNATURE, X_DISCLAIMER ?? - these are probably best
313:         // done as includes if mail templates ever get this sophisticated
314:         // replace tags with actual values
315:         foreach ($this->assignedTags as $k => $v) {
316:             $this->body    = str_replace('{' . $k . '}', $v, $this->body);
317:             $this->subject = str_replace('{' . $k . '}', $v, $this->subject);
318:         }
319:         $this->body = str_replace("\r\n", "\n", $this->body);
320:         $this->body = str_replace("\r", "\n", $this->body);
321:         $this->body = str_replace("\n", $this->LE, $this->body);
322:         // send mail to specified mail addresses, if any
323:         foreach ($this->toEmails as $mailaddr) {
324:             if (!$this->sendMail($mailaddr, $this->subject, $this->body, $headers)) {
325:                 if ($debug) {
326:                     $this->errors[] = sprintf(_MAIL_SENDMAILNG, $mailaddr);
327:                 }
328:             } else {
329:                 if ($debug) {
330:                     $this->success[] = sprintf(_MAIL_MAILGOOD, $mailaddr);
331:                 }
332:             }
333:         }
334:         // send message to specified users, if any
335:         // NOTE: we don't send to LIST of recipients, because the tags
336:         // below are dependent on the user identity; i.e. each user
337:         // receives (potentially) a different message
338:         foreach ($this->toUsers as $user) {
339:             // set some user specific variables
340:             $subject = str_replace('{X_UNAME}', $user->getVar('uname'), $this->subject);
341:             $text    = str_replace('{X_UID}', $user->getVar('uid'), $this->body);
342:             $text    = str_replace('{X_UEMAIL}', $user->getVar('email'), $text);
343:             $text    = str_replace('{X_UNAME}', $user->getVar('uname'), $text);
344:             $text    = str_replace('{X_UACTLINK}', XOOPS_URL . '/register.php?op=actv&id=' . $user->getVar('uid') . '&actkey=' . $user->getVar('actkey'), $text);
345:             // send mail
346:             if ($this->isMail) {
347:                 if (!$this->sendMail($user->getVar('email'), $subject, $text, $headers)) {
348:                     if ($debug) {
349:                         $this->errors[] = sprintf(_MAIL_SENDMAILNG, $user->getVar('uname'));
350:                     }
351:                 } else {
352:                     if ($debug) {
353:                         $this->success[] = sprintf(_MAIL_MAILGOOD, $user->getVar('uname'));
354:                     }
355:                 }
356:             }
357:             // send private message
358:             if ($this->isPM) {
359:                 if (!$this->sendPM($user->getVar('uid'), $subject, $text)) {
360:                     if ($debug) {
361:                         $this->errors[] = sprintf(_MAIL_SENDPMNG, $user->getVar('uname'));
362:                     }
363:                 } else {
364:                     if ($debug) {
365:                         $this->success[] = sprintf(_MAIL_PMGOOD, $user->getVar('uname'));
366:                     }
367:                 }
368:             }
369:             flush();
370:         }
371:         return !(count($this->errors) > 0);
372:     }
373: 
374:     // private
375:     /**
376:      * @param $uid
377:      * @param $subject
378:      * @param $body
379:      *
380:      * @return bool
381:      */
382:     public function sendPM($uid, $subject, $body)
383:     {
384:         global $xoopsUser;
385:         $pm_handler = xoops_getHandler('privmessage');
386:         $pm         = $pm_handler->create();
387:         $pm->setVar('subject', $subject);
388:         // RMV-NOTIFY
389:         $pm->setVar('from_userid', !empty($this->fromUser) ? $this->fromUser->getVar('uid') : (empty($xoopsUser) ? 1 : $xoopsUser->getVar('uid')));
390:         $pm->setVar('msg_text', $body);
391:         $pm->setVar('to_userid', $uid);
392:         if (!$pm_handler->insert($pm)) {
393:             return false;
394:         }
395: 
396:         return true;
397:     }
398: 
399:     /**
400:      * Send email
401:      *
402:      * Uses the new XoopsMultiMailer
403:      *
404:      * @param $email
405:      * @param $subject
406:      * @param $body
407:      * @param $headers
408:      *
409:      * @return bool
410:      */
411:     public function sendMail($email, $subject, $body, $headers)
412:     {
413:         $subject = $this->encodeSubject($subject);
414:         $this->encodeBody($body);
415:         $this->multimailer->clearAllRecipients();
416:         $this->multimailer->addAddress($email);
417:         $this->multimailer->Subject  = $subject;
418:         $this->multimailer->Body     = $body;
419:         $this->multimailer->CharSet  = $this->charSet;
420:         $this->multimailer->Encoding = $this->encoding;
421:         if (!empty($this->fromName)) {
422:             $this->multimailer->FromName = $this->encodeFromName($this->fromName);
423:         }
424:         if (!empty($this->fromEmail)) {
425:             $this->multimailer->Sender = $this->multimailer->From = $this->fromEmail;
426:         }
427: 
428:         $this->multimailer->clearCustomHeaders();
429:         foreach ($this->headers as $header) {
430:             $this->multimailer->addCustomHeader($header);
431:         }
432:         if (!$this->multimailer->send()) {
433:             $this->errors[] = $this->multimailer->ErrorInfo;
434: 
435:             return false;
436:         }
437: 
438:         return true;
439:     }
440: 
441:     // public
442:     /**
443:      * @param bool $ashtml
444:      *
445:      * @return string
446:      */
447:     public function getErrors($ashtml = true)
448:     {
449:         if (!$ashtml) {
450:             return $this->errors;
451:         } else {
452:             if (!empty($this->errors)) {
453:                 $ret = '<h4>' . _ERRORS . '</h4>';
454:                 foreach ($this->errors as $error) {
455:                     $ret .= $error . '<br>';
456:                 }
457:             } else {
458:                 $ret = '';
459:             }
460: 
461:             return $ret;
462:         }
463:     }
464: 
465:     // public
466:     /**
467:      * @param bool $ashtml
468:      *
469:      * @return string
470:      */
471:     public function getSuccess($ashtml = true)
472:     {
473:         if (!$ashtml) {
474:             return $this->success;
475:         } else {
476:             $ret = '';
477:             if (!empty($this->success)) {
478:                 foreach ($this->success as $suc) {
479:                     $ret .= $suc . '<br>';
480:                 }
481:             }
482: 
483:             return $ret;
484:         }
485:     }
486: 
487:     // public
488:     /**
489:      * @param      $tag
490:      * @param null $value
491:      */
492:     public function assign($tag, $value = null)
493:     {
494:         if (is_array($tag)) {
495:             foreach ($tag as $k => $v) {
496:                 $this->assign($k, $v);
497:             }
498:         } else {
499:             if (!empty($tag) && isset($value)) {
500:                 $tag = strtoupper(trim($tag));
501:                 // RMV-NOTIFY
502:                 // TEMPORARY FIXME: until the X_tags are all in here
503:                 // if ( substr($tag, 0, 2) != "X_" ) {
504:                 $this->assignedTags[$tag] = $value;
505:                 // }
506:             }
507:         }
508:     }
509: 
510:     // public
511:     /**
512:      * @param $value
513:      */
514:     public function addHeaders($value)
515:     {
516:         $this->headers[] = trim($value) . $this->LE;
517:     }
518: 
519:     // public
520:     /**
521:      * @param $email
522:      */
523:     public function setToEmails($email)
524:     {
525:         if (!is_array($email)) {
526:             if (preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i", $email)) {
527:                 array_push($this->toEmails, $email);
528:             }
529:         } else {
530:             foreach ($email as $e) {
531:                 $this->setToEmails($e);
532:             }
533:         }
534:     }
535: 
536:     // public
537:     /**
538:      * @param $user
539:      */
540:     public function setToUsers(&$user)
541:     {
542:         if (!is_array($user)) {
543:             if (strtolower(get_class($user)) === 'xoopsuser') {
544:                 array_push($this->toUsers, $user);
545:             }
546:         } else {
547:             foreach ($user as $u) {
548:                 $this->setToUsers($u);
549:             }
550:         }
551:     }
552: 
553:     // public
554:     /**
555:      * @param $group
556:      */
557:     public function setToGroups($group)
558:     {
559:         if (!is_array($group)) {
560:             if (strtolower(get_class($group)) === 'xoopsgroup') {
561:                 /* @var $member_handler XoopsMemberHandler */
562:                 $member_handler = xoops_getHandler('member');
563:                 $this->setToUsers($member_handler->getUsersByGroup($group->getVar('groupid'), true));
564:             }
565:         } else {
566:             foreach ($group as $g) {
567:                 $this->setToGroups($g);
568:             }
569:         }
570:     }
571: 
572:     // abstract
573:     // to be overridden by lang specific mail class, if needed
574:     /**
575:      * @param $text
576:      *
577:      * @return mixed
578:      */
579:     public function encodeFromName($text)
580:     {
581:         return $text;
582:     }
583: 
584:     // abstract
585:     // to be overridden by lang specific mail class, if needed
586:     /**
587:      * @param $text
588:      *
589:      * @return mixed
590:      */
591:     public function encodeSubject($text)
592:     {
593:         return $text;
594:     }
595: 
596:     // abstract
597:     // to be overridden by lang specific mail class, if needed
598:     /**
599:      * @param $text
600:      */
601:     public function encodeBody(&$text)
602:     {
603:     }
604: }
605: 
API documentation generated by ApiGen