class Envelop (View source)

Constants

END

The mail end of line

Methods

__construct(bool $boundary = true)

Envelop Constructor.

void
setDefaultHeader()

Set the default header

void
setBoundary(string $boundary)

Change the value of the boundary

withHeader(string $key, string $value)

Add personal headers

to(string|array $to)

Define the receiver

addFile(string $file)

Add an attachment file

string
compileHeaders()

Compile the mail header

subject(string $subject)

Define the subject of the mail

from(string $from, string|null $name = null)

Define the sender of the mail

html(string $html)

Define the type of content in text/html

text(string $text)

Add message body

addBcc(string $mail, string|null $name = null)

Adds blind carbon copy

bcc(string $mail, string|null $name = null)

Adds blind carbon copy

addCc(string $mail, string|null $name = null)

Add carbon copy

cc(string $mail, string|null $name = null)

Add carbon copy

addReplyTo(string $mail, string|null $name = null)

Add Reply-To

replyTo(string $mail, string|null $name = null)

Add Reply-To

addReturnPath(string $mail, string|null $name = null)

Add Return-Path

returnPath(string $mail, string|null $name = null)

Add Return-Path

addPriority(int $priority)

Set email priority.

setPriority(int $priority)

Set email priority.

array
getHeaders()

Get the headers

string|null
getSubject()

Get the subject of the email

string|null
getFrom()

Get the sender

string|null
getMessage()

Get the email message

void
setMessage(string $message, string $type = 'text/html')

Edit the mail message

string|null
getCharset()

Get the email encoding

string|null
getType()

Get Content-Type

bool
fromIsDefined()

Get the value of a variable that verifies that a sender is registered

view(string $view, array $data = [])

Set the view build

message(string $message, string $type = 'text/html')

Alias of setMessage

array
getTo()

Get the list of receivers

Details

__construct(bool $boundary = true)

Envelop Constructor.

Parameters

bool $boundary

void setDefaultHeader()

Set the default header

Return Value

void

protected void setBoundary(string $boundary)

Change the value of the boundary

Parameters

string $boundary

Return Value

void

Envelop withHeader(string $key, string $value)

Add personal headers

Parameters

string $key
string $value

Return Value

Envelop

Envelop to(string|array $to)

Define the receiver

Parameters

string|array $to

Return Value

Envelop

Envelop addFile(string $file)

Add an attachment file

Parameters

string $file

Return Value

Envelop

Exceptions

MailException

string compileHeaders()

Compile the mail header

Return Value

string

Envelop subject(string $subject)

Define the subject of the mail

Parameters

string $subject

Return Value

Envelop

Envelop from(string $from, string|null $name = null)

Define the sender of the mail

Parameters

string $from
string|null $name

Return Value

Envelop

Envelop html(string $html)

Define the type of content in text/html

Parameters

string $html

Return Value

Envelop

Envelop text(string $text)

Add message body

Parameters

string $text

Return Value

Envelop

Envelop addBcc(string $mail, string|null $name = null)

Adds blind carbon copy

Parameters

string $mail
string|null $name

Return Value

Envelop

Envelop bcc(string $mail, string|null $name = null)

Adds blind carbon copy

Parameters

string $mail
string|null $name

Return Value

Envelop

Envelop addCc(string $mail, string|null $name = null)

Add carbon copy

Parameters

string $mail
string|null $name

Return Value

Envelop

Envelop cc(string $mail, string|null $name = null)

Add carbon copy

Parameters

string $mail
string|null $name

Return Value

Envelop

Envelop addReplyTo(string $mail, string|null $name = null)

Add Reply-To

Parameters

string $mail
string|null $name

Return Value

Envelop

Envelop replyTo(string $mail, string|null $name = null)

Add Reply-To

Parameters

string $mail
string|null $name

Return Value

Envelop

Envelop addReturnPath(string $mail, string|null $name = null)

Add Return-Path

Parameters

string $mail
string|null $name

= null

Return Value

Envelop

Envelop returnPath(string $mail, string|null $name = null)

Add Return-Path

Parameters

string $mail
string|null $name

= null

Return Value

Envelop

Envelop addPriority(int $priority)

Set email priority.

Parameters

int $priority

Return Value

Envelop

Envelop setPriority(int $priority)

Set email priority.

Parameters

int $priority

Return Value

Envelop

array getHeaders()

Get the headers

Return Value

array

string|null getSubject()

Get the subject of the email

Return Value

string|null

string|null getFrom()

Get the sender

Return Value

string|null

string|null getMessage()

Get the email message

Return Value

string|null

void setMessage(string $message, string $type = 'text/html')

Edit the mail message

Parameters

string $message
string $type

Return Value

void

string|null getCharset()

Get the email encoding

Return Value

string|null

string|null getType()

Get Content-Type

Return Value

string|null

bool fromIsDefined()

Get the value of a variable that verifies that a sender is registered

Return Value

bool

Envelop view(string $view, array $data = [])

Set the view build

Parameters

string $view
array $data

Return Value

Envelop

Envelop message(string $message, string $type = 'text/html')

Alias of setMessage

Parameters

string $message
string $type

Return Value

Envelop

See also

setEnvelop

array getTo()

Get the list of receivers

Return Value

array