classe Message (Voir la source)

Constantes

END

The mail end of line

Méthodes

__construct(bool $boundary = true)

Message Constructor.

void
setDefaultHeader()

Set the default header

void
addHeader(string $key, string $value)

Add personal headers

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

Define the receiver

toList(array $sendTo)

Define the receiver in list

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

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

Add carbon copy

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

Add Reply-To

void
setBoundary(string $boundary)

Change the value of the boundary

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

Add Return-Path

addPriority(int $priority)

Set email priority.

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

Edit the mail message

array
getHeaders()

Get the headers

array
getTo()

Get the list of receivers

string|null
getSubject()

Get the subject of the email

string
getFrom()

Get the sender

string
getMessage()

Get the email message

string
getCharset()

Get the email encoding

string
getType()

Get Content-Type

bool
fromIsDefined()

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

Détails

__construct(bool $boundary = true)

Message Constructor.

Paramètres

bool $boundary

void setDefaultHeader()

Set the default header

Valeur de retour

void

void addHeader(string $key, string $value)

Add personal headers

Paramètres

string $key
string $value

Valeur de retour

void

Message to(string $to, string|null $name = null)

Define the receiver

Paramètres

string $to
string|null $name

Valeur de retour

Message

Message toList(array $sendTo)

Define the receiver in list

Paramètres

array $sendTo

Valeur de retour

Message

Message addFile(string $file)

Add an attachment file

Paramètres

string $file

Valeur de retour

Message

Exceptions

MailException

string compileHeaders()

Compile the mail header

Valeur de retour

string

Message subject(string $subject)

Define the subject of the mail

Paramètres

string $subject

Valeur de retour

Message

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

Define the sender of the mail

Paramètres

string $from
string|null $name

Valeur de retour

Message

Message html(string $html)

Define the type of content in text/html

Paramètres

string $html

Valeur de retour

Message

Message text(string $text)

Add message body

Paramètres

string $text

Valeur de retour

Message

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

Adds blind carbon copy

Paramètres

string $mail
string|null $name [optional]

Valeur de retour

Message

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

Add carbon copy

Paramètres

string $mail
string|null $name [optional]

Valeur de retour

Message

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

Add Reply-To

Paramètres

string $mail
string|null $name

Valeur de retour

Message

protected void setBoundary(string $boundary)

Change the value of the boundary

Paramètres

string $boundary

Valeur de retour

void

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

Add Return-Path

Paramètres

string $mail
string|null $name

= null

Valeur de retour

Message

Message addPriority(int $priority)

Set email priority.

Paramètres

int $priority

Valeur de retour

Message

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

Edit the mail message

Paramètres

string $message
string $type

array getHeaders()

Get the headers

Valeur de retour

array

array getTo()

Get the list of receivers

Valeur de retour

array

string|null getSubject()

Get the subject of the email

Valeur de retour

string|null

string getFrom()

Get the sender

Valeur de retour

string

string getMessage()

Get the email message

Valeur de retour

string

string getCharset()

Get the email encoding

Valeur de retour

string

string getType()

Get Content-Type

Valeur de retour

string

bool fromIsDefined()

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

Valeur de retour

bool