Arikaim CMS

Mailer
in package
implements MailerInterface Uses LoggerTrait

Send emails

Table of Contents

Interfaces

MailerInterface
Mail interface

Constants

LOG_ERROR_MESSAGE  = 'Error send email.'
LOG_INFO_MESSAGE  = 'Email send successful.'

Properties

$logger  : LoggerInterface|null
Logger ref
$driverName  : string|null
Driver name
$error  : string|null
Mailer error message
$mailer  : Mailer
Mailer object
$options  : array<string|int, mixed>
Options
$view  : EmailViewInterface|null
Email component renderer

Methods

__construct()  : mixed
Constructor
crateSendmailTranspart()  : object
Create sendmail transport
create()  : MailInterface|null
Create message
getErrorMessage()  : string|null
Get error message
getFromEmail()  : string
Get from email option
getFromName()  : string
Get from name option
getLogger()  : LoggerInterface|null
Get logger
getOption()  : mixed
Get option value
getOptions()  : array<string|int, mixed>
Return options
getTransport()  : Transport
Get mailer transport
LogError()  : bool
Log error message
Loginfo()  : bool
Log info messsage
send()  : bool
Send email
setLogger()  : void
Set logger

Constants

LOG_ERROR_MESSAGE

public mixed LOG_ERROR_MESSAGE = 'Error send email.'

LOG_INFO_MESSAGE

public mixed LOG_INFO_MESSAGE = 'Email send successful.'

Properties

$driverName

Driver name

private string|null $driverName = 'sendmail'

$error

Mailer error message

private string|null $error = null

$mailer

Mailer object

private Mailer $mailer

$options

Options

private array<string|int, mixed> $options = []

Methods

crateSendmailTranspart()

Create sendmail transport

public static crateSendmailTranspart() : object
Return values
object

create()

Create message

public create([string|null $componentName = null ][, array<string|int, mixed> $params = [] ][, string|null $language = null ]) : MailInterface|null
Parameters
$componentName : string|null = null
$params : array<string|int, mixed> = []
$language : string|null = null
Return values
MailInterface|null

getErrorMessage()

Get error message

public getErrorMessage() : string|null
Return values
string|null

getFromEmail()

Get from email option

public getFromEmail() : string
Return values
string

getFromName()

Get from name option

public getFromName() : string
Return values
string

getOption()

Get option value

public getOption(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null

getOptions()

Return options

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTransport()

Get mailer transport

public getTransport() : Transport
Return values
Transport

LogError()

Log error message

public LogError(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$message : string
$context : array<string|int, mixed> = []
Return values
bool

Loginfo()

Log info messsage

public Loginfo(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$message : string
$context : array<string|int, mixed> = []
Return values
bool

        
On this page

Search results