Jelix 1.6.40

jMailer extends PHPMailer
in package

jMailer based on PHPMailer - PHP email transport class

Tags
subpackage

utils

author

Laurent Jouanneau

contributor

Kévin Lepeltier

copyright

2006-2022 Laurent Jouanneau

copyright

2008 Kévin Lepeltier

since
1.0b1
see
PHPMailer

Table of Contents

DEBUG_RECEIVER_CONFIG  = 1
DEBUG_RECEIVER_USER  = 2
$filePath  : mixed
the path of the directory where to store mails if mailer is file.
$bodyTpl  : string
the selector of the template used for the mail.
$copyToFiles  : mixed
indicates if mails should be copied into files, so the developer can verify that all mails are sent.
$debugBodyIntroduction  : mixed
$debugFrom  : string
$debugFromName  : string
$debugModeEnabled  : bool
Debug mode.
$debugOriginalValues  : mixed
$debugReceivers  : array<string|int, mixed>
List of addresses to send all emails. Addresses in "To"
$debugReceiversEnabled  : bool
Debug mode for receivers. If activated, debugReceivers should be filled
$debugReceiversType  : int
$debugReceiversWhiteList  : array<string|int, mixed>
List of valid addresses
$debugSubjectPrefix  : mixed
$defaultLang  : mixed
$html2textConverter  : mixed
$htmlImageBaseDir  : mixed
$tpl  : mixed
__construct()  : mixed
initialize some member
CreateHeader()  : mixed
debugOutputCallback()  : mixed
getAddrName()  : array<string|int, mixed>
Find the name and address in the form "name<address@hop.tld>"
html2textKeepLinkSafe()  : string
Convert HTML content to Text.
IsFile()  : void
Sets Mailer to store message into files instead of sending it useful for tests.
Send()  : bool
Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
SetLanguage()  : mixed
Tpl()  : jTpl
Adds a Tpl référence.
copyMail()  : mixed
debugOverrideReceivers()  : mixed
FileSend()  : bool
store mail in file instead of sending it
getStorageFile()  : mixed
lang()  : mixed
MailSend()  : mixed
sendmailSend()  : mixed
setError()  : mixed
smtpSend()  : mixed

Constants

DEBUG_RECEIVER_CONFIG

public mixed DEBUG_RECEIVER_CONFIG = 1

Properties

$filePath

the path of the directory where to store mails if mailer is file.

public mixed $filePath = ''

$bodyTpl

the selector of the template used for the mail.

protected string $bodyTpl = ''

Use the Tpl() method to change this property

$copyToFiles

indicates if mails should be copied into files, so the developer can verify that all mails are sent.

protected mixed $copyToFiles = alse

$debugBodyIntroduction

protected mixed $debugBodyIntroduction = 'This is an example of a message that could be send with following parameters, in the normal mode:'

$debugFrom

protected string $debugFrom = ''

replacement for the From header

$debugFromName

protected string $debugFromName = ''

replacement for the From header

$debugModeEnabled

Debug mode.

protected bool $debugModeEnabled = alse

$debugOriginalValues

protected mixed $debugOriginalValues = array()

$debugReceivers

List of addresses to send all emails. Addresses in "To"

protected array<string|int, mixed> $debugReceivers = array()

$debugReceiversEnabled

Debug mode for receivers. If activated, debugReceivers should be filled

protected bool $debugReceiversEnabled = alse

$debugReceiversType

protected int $debugReceiversType = 1

combination of DEBUG_RECEIVER_*

$debugReceiversWhiteList

List of valid addresses

protected array<string|int, mixed> $debugReceiversWhiteList = array()

Receivers for 'To' having these emails will not be replaced by debugReceivers Receivers for 'Cc' and 'Bcc' having these emails will not be removed

$debugSubjectPrefix

protected mixed $debugSubjectPrefix = '[DEBUG MODE]'

$html2textConverter

protected mixed $html2textConverter = alse

Methods

__construct()

initialize some member

public __construct() : mixed
Return values
mixed

CreateHeader()

public CreateHeader() : mixed
Return values
mixed

debugOutputCallback()

public debugOutputCallback(mixed $msg, mixed $smtpDebugLevel) : mixed
Parameters
$msg : mixed
$smtpDebugLevel : mixed
Return values
mixed

getAddrName()

Find the name and address in the form "name<address@hop.tld>"

public getAddrName(string $address[, string $kind = false ]) : array<string|int, mixed>
Parameters
$address : string
$kind : string = false

One of 'to', 'cc', 'bcc', or 'ReplyTo'

Return values
array<string|int, mixed>

contains $name, $address.

IsFile()

Sets Mailer to store message into files instead of sending it useful for tests.

public IsFile() : void
Return values
void

Send()

Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.

public Send() : bool
Return values
bool

SetLanguage()

public SetLanguage([mixed $lang_type = 'en' ][, mixed $lang_path = 'language/' ]) : mixed
Parameters
$lang_type : mixed = 'en'
$lang_path : mixed = 'language/'
Return values
mixed

Tpl()

Adds a Tpl référence.

public Tpl(string $selector[, bool $isHtml = false ][, mixed $html2textConverter = false ][, mixed $htmlImageBaseDir = '' ]) : jTpl
Parameters
$selector : string
$isHtml : bool = false

true if the content of the template is html. IsHTML() is called.

$html2textConverter : mixed = false
$htmlImageBaseDir : mixed = ''
Return values
jTpl

the template object.

copyMail()

protected copyMail(mixed $header, mixed $body) : mixed
Parameters
$header : mixed
$body : mixed
Return values
mixed

debugOverrideReceivers()

protected debugOverrideReceivers() : mixed
Return values
mixed

FileSend()

store mail in file instead of sending it

protected FileSend(mixed $header, mixed $body) : bool
Parameters
$header : mixed
$body : mixed
Tags
access

public

Return values
bool

getStorageFile()

protected getStorageFile() : mixed
Return values
mixed

lang()

protected lang(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

MailSend()

protected MailSend(mixed $header, mixed $body) : mixed
Parameters
$header : mixed
$body : mixed
Return values
mixed

sendmailSend()

protected sendmailSend(mixed $header, mixed $body) : mixed
Parameters
$header : mixed
$body : mixed
Return values
mixed

setError()

protected setError(mixed $msg) : mixed
Parameters
$msg : mixed
Return values
mixed

smtpSend()

protected smtpSend(mixed $header, mixed $body) : mixed
Parameters
$header : mixed
$body : mixed
Return values
mixed

Search results