Arikaim CMS

Mail
in package
implements MailInterface

Mail base class

Table of Contents

Interfaces

MailInterface
Mail interface

Constants

HTML_CONTENT_TYPE  = 'text/html'
PLAIN_CONTENT_TYPE  = 'text/plain'

Properties

$contentType  : string
Email content type
$errors  : mixed
Errors
$message  : Email
Message
$mailer  : MailerInterface
Mailer

Methods

__construct()  : mixed
Constructor
attach()  : self
Attach file
bcc()  : self
Set bcc
build()  : self
Build email
cc()  : self
Set cc
contentType()  : self
Set email content type
create()  : self
Create mail
from()  : self
Set from
getBody()  : mixed
Return message body
getError()  : string|null
Get error message
getErros()  : array<string|int, mixed>
Get errors
getFrom()  : mixed
Get from address email, name
getMessage()  : Email
Get message instance
hasError()  : bool
Has errors
message()  : self
Set email body
priority()  : self
Set priority
replyTo()  : self
Set reply to
send()  : bool
Send email
subject()  : self
Set email subject
to()  : self
Set to

Constants

HTML_CONTENT_TYPE

public mixed HTML_CONTENT_TYPE = 'text/html'

PLAIN_CONTENT_TYPE

public mixed PLAIN_CONTENT_TYPE = 'text/plain'

Properties

$contentType

Email content type

protected string $contentType = Self::PLAIN_CONTENT_TYPE

$errors

Errors

protected mixed $errors = []

@var array

$message

Message

protected Email $message

Methods

attach()

Attach file

public attach(string $path[, string $name = null ][, string $contentType = null ]) : self
Parameters
$path : string
$name : string = null
$contentType : string = null
Return values
self

bcc()

Set bcc

public bcc(string $email[, string|null $name = null ]) : self
Parameters
$email : string
$name : string|null = null
Return values
self

build()

Build email

public build() : self
Return values
self

cc()

Set cc

public cc(string $email[, string|null $name = null ]) : self
Parameters
$email : string
$name : string|null = null
Return values
self

contentType()

Set email content type

public contentType([string $type = Self::PLAIN_CONTENT_TYPE ]) : self
Parameters
$type : string = Self::PLAIN_CONTENT_TYPE
Return values
self

from()

Set from

public from(string $email[, string|null $name = null ]) : self
Parameters
$email : string
$name : string|null = null
Return values
self

getBody()

Return message body

public getBody() : mixed

getError()

Get error message

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

getErros()

Get errors

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

getFrom()

Get from address email, name

public getFrom() : mixed

getMessage()

Get message instance

public getMessage() : Email
Return values
Email

hasError()

Has errors

public hasError() : bool
Return values
bool

message()

Set email body

public message(string $message[, string|null $contentType = null ]) : self
Parameters
$message : string
$contentType : string|null = null
Return values
self

priority()

Set priority

public priority([int $priority = 3 ]) : self
Parameters
$priority : int = 3
Return values
self

replyTo()

Set reply to

public replyTo(string $email[, string|null $name = null ]) : self
Parameters
$email : string
$name : string|null = null
Return values
self

send()

Send email

public send() : bool
Return values
bool

subject()

Set email subject

public subject(string $subject) : self
Parameters
$subject : string
Return values
self

to()

Set to

public to(string $email[, string|null $name = null ]) : self
Parameters
$email : string
$name : string|null = null
Return values
self

        
On this page

Search results