VuFind API Documentation

Email
in package
implements HandlerInterface, LoggerAwareInterface Uses LoggerAwareTrait

Class Email

Tags
category

VuFind

author

Josef Moravec moravec@mzk.cz

license

https://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

HandlerInterface
Interface HandlerInterface
LoggerAwareInterface

Table of Contents

$mailer  : Mailer
Mailer
$mainConfig  : Config
Main config
$viewRenderer  : RendererInterface
View renderer
__construct()  : mixed
Constructor
handle()  : bool
Get data from submitted form and process them.
debug()  : void
Log a debug message.
getSender()  : array<string|int, mixed>
Return email sender from configuration.
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.
sendEmail()  : bool
Send form data as email.

Properties

$mainConfig

Main config

protected Config $mainConfig

$viewRenderer

View renderer

protected RendererInterface $viewRenderer

Methods

__construct()

Constructor

public __construct(RendererInterface $viewRenderer, Config $config, Mailer $mailer) : mixed
Parameters
$viewRenderer : RendererInterface

View renderer

$config : Config

Main config

$mailer : Mailer

Mailer

Return values
mixed

handle()

Get data from submitted form and process them.

public handle(Form $form, Params $params[, UserEntityInterface|null $user = null ]) : bool
Parameters
$form : Form

Submitted form

$params : Params

Request params

$user : UserEntityInterface|null = null

Authenticated user

Return values
bool

debug()

Log a debug message.

protected debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

getSender()

Return email sender from configuration.

protected getSender(Form $form) : array<string|int, mixed>
Parameters
$form : Form

Form

Return values
array<string|int, mixed>

with name, email

log()

Send a message to the logger.

protected log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
$level : string

Log level

$message : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = false

Prepend class name to message?

Return values
void

logError()

Log an error message.

protected logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

logWarning()

Log a warning message.

protected logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

sendEmail()

Send form data as email.

protected sendEmail(string $recipientName, string $recipientEmail, string $senderName, string $senderEmail, string $replyToName, string $replyToEmail, string $emailSubject, string $emailMessage) : bool
Parameters
$recipientName : string

Recipient name

$recipientEmail : string

Recipient email

$senderName : string

Sender name

$senderEmail : string

Sender email

$replyToName : string

Reply-to name

$replyToEmail : string

Reply-to email

$emailSubject : string

Email subject

$emailMessage : string

Email message

Return values
bool

Search results