class MimeMessage extends AbstractMailerAware implements MessageInterface

Methods

getMailer()

Get the mailer instance

__construct(string $from_name = '', string $from_mail = null, string|array $to = null, string $subject = null, string $message = null)

Construction of a MimeEmail object

set(string $name, mixed $val)

Global setter

mixed
get(string $name)

Global getter

clear(string $name = null)

Global variable clearer

string
getFormated(string $name)

Get a fromated address info (name ) for $name field

string
getId()

Get message ID

setFrom(string/array $mail = '', string/bool $name = null, bool $reply = true)

Set From field

setTo(string/array $mail = '', string/bool $name = null)

Set To field

setCc(string/array $mail = '', string/bool $name = null)

Set Cc field

setBcc(string/array $mail = '', string/bool $name = null)

Set Bcc field

setAttachment(string|array $file = '', bool $clear = false)

Set mail file attachment

setSubject(string $subject = '', bool $clear = false)

Set mail object

setText(string $text = '', bool $clear = false)

Set plain text version

setHtml(string $html = '', bool $clear = false)

Set HTML version

setReplyTo(string/array $mail = '', string/bool $name = null)

Set Reply-To header field

setFollowupTo(string/array $mail = '', string/bool $name = null)

Set Foolowup-To header field

setErrorsTo(string/array $mail = '', string/bool $name = null)

Set Errors-To header field

setDispositionNotificationTo(string/array $mail = '', string/bool $name = null)

Set Disposition-Notification-To header field

setAbuseReportsTo(string/array $mail = '', string/bool $name = null)

Set Abuse-Reports-To header field

setReturnReceiptTo(string/array $mail = '', string/bool $name = null)

Set Return-Receipt-To header field

string
getMessage()

Get sent built message

buildMessage()

Message builder

string
makeBoundary()

Build a boundary value

string
substitution(string $search, string $replace)

Make a basic substitution in the object body

Details

in AbstractMailerAware at line 38
Mailer getMailer()

Get the mailer instance

Return Value

Mailer

at line 115
__construct(string $from_name = '', string $from_mail = null, string|array $to = null, string $subject = null, string $message = null)

Construction of a MimeEmail object

Parameters

string $from_name
string $from_mail
string|array $to
string $subject
string $message

at line 175
MimeMessage set(string $name, mixed $val)

Global setter

Parameters

string $name
mixed $val

Return Value

MimeMessage

at line 189
mixed get(string $name)

Global getter

Parameters

string $name

Return Value

mixed

at line 200
MimeMessage clear(string $name = null)

Global variable clearer

Parameters

string $name

Return Value

MimeMessage

at line 221
string getFormated(string $name)

Get a fromated address info (name ) for $name field

Parameters

string $name

Return Value

string

at line 232
string getId()

Get message ID

Return Value

string

at line 246
MimeMessage setFrom(string/array $mail = '', string/bool $name = null, bool $reply = true)

Set From field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one
bool $reply Set the "reply-to" to the same address ? (default is TRUE)

Return Value

MimeMessage

See also

\MimeMailer\MimeEmail::checkPeopleArgs

at line 268
MimeMessage setTo(string/array $mail = '', string/bool $name = null)

Set To field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

See also

\MimeMailer\MimeEmail::checkPeopleArgs

at line 284
MimeMessage setCc(string/array $mail = '', string/bool $name = null)

Set Cc field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

See also

\MimeMailer\MimeEmail::checkPeopleArgs

at line 300
MimeMessage setBcc(string/array $mail = '', string/bool $name = null)

Set Bcc field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

See also

\MimeMailer\MimeEmail::checkPeopleArgs

at line 315
MimeMessage setAttachment(string|array $file = '', bool $clear = false)

Set mail file attachment

Parameters

string|array $file The file or files to attach
bool $clear Clear a set content first ? (default is to append a content)

Return Value

MimeMessage

at line 341
MimeMessage setSubject(string $subject = '', bool $clear = false)

Set mail object

Parameters

string $subject The subject content
bool $clear Clear a set content first ? (default is to append a content)

Return Value

MimeMessage

at line 359
MimeMessage setText(string $text = '', bool $clear = false)

Set plain text version

If $text='auto', the text version will be generated from the HTML content

Parameters

string $text The plain text content or keyword 'auto' to auto-generate it from the HTML content
bool $clear Clear a set content first ? (default is to append a content)

Return Value

MimeMessage

at line 382
MimeMessage setHtml(string $html = '', bool $clear = false)

Set HTML version

Parameters

string $html The HTML content
bool $clear Clear a set content first ? (default is to append a content)

Return Value

MimeMessage

at line 398
MimeMessage setReplyTo(string/array $mail = '', string/bool $name = null)

Set Reply-To header field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

at line 418
MimeMessage setFollowupTo(string/array $mail = '', string/bool $name = null)

Set Foolowup-To header field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

at line 438
MimeMessage setErrorsTo(string/array $mail = '', string/bool $name = null)

Set Errors-To header field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

at line 458
MimeMessage setDispositionNotificationTo(string/array $mail = '', string/bool $name = null)

Set Disposition-Notification-To header field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

at line 478
MimeMessage setAbuseReportsTo(string/array $mail = '', string/bool $name = null)

Set Abuse-Reports-To header field

Parameters

string/array $mail
string/bool $name

Return Value

MimeMessage

at line 500
MimeMessage setReturnReceiptTo(string/array $mail = '', string/bool $name = null)

Set Return-Receipt-To header field

Parameters

string/array $mail The email address to add, or an array of name=>email pairs
string/bool $name The name to show for the email address if there is just one

Return Value

MimeMessage

at line 518
string getMessage()

Get sent built message

Return Value

string

at line 532
MimeMessage buildMessage()

Message builder

Return Value

MimeMessage

at line 651
string makeBoundary()

Build a boundary value

Return Value

string The generated boundary

at line 663
string substitution(string $search, string $replace)

Make a basic substitution in the object body

Parameters

string $search The string to search
string $replace The string to use for replacement

Return Value

string The generated body