Class Mail
Mail provides functionality to compose and send both text and MIME-compliant multipart email messages.
- Object
-
MailMimePart
-
Mail
public
|
#
__construct(
)
|
public
Mail
|
#
setFrom(
string
$email,
string
$name = NULL
)
Sets the sender of the message. Sets the sender of the message. Parameters$email string email or format "John Doe" <doe$name stringReturnsMail provides a fluent interface
|
public
array
|
#
getFrom(
)
Returns the sender of the message. Returns the sender of the message. |
public
Mail
|
#
addReplyTo(
string
$email,
string
$name = NULL
)
Adds the reply-to address. Adds the reply-to address. Parameters$email string email or format "John Doe" <doe$name stringReturnsMail provides a fluent interface
|
public
Mail
|
#
setSubject(
string
$subject
)
Sets the subject of the message. Sets the subject of the message. Parameters$subject stringReturnsMail provides a fluent interface
|
public
string
|
#
getSubject(
)
Returns the subject of the message. Returns the subject of the message. |
public
Mail
|
#
addTo(
string
$email,
string
$name = NULL
)
Adds email recipient. Adds email recipient. Parameters$email string email or format "John Doe" <doe$name stringReturnsMail provides a fluent interface
|
public
Mail
|
#
addCc(
string
$email,
string
$name = NULL
)
Adds carbon copy email recipient. Adds carbon copy email recipient. Parameters$email string email or format "John Doe" <doe$name stringReturnsMail provides a fluent interface
|
public
Mail
|
#
addBcc(
string
$email,
string
$name = NULL
)
Adds blind carbon copy email recipient. Adds blind carbon copy email recipient. Parameters$email string email or format "John Doe" <doe$name stringReturnsMail provides a fluent interface
|
public
Mail
|
#
setReturnPath(
string
$email
)
Sets the Return-Path header of the message. Sets the Return-Path header of the message. Parameters$email string emailReturnsMail provides a fluent interface
|
public
string
|
#
getReturnPath(
)
Returns the Return-Path header. Returns the Return-Path header. |
public
Mail
|
#
setPriority(
int
$priority
)
Sets email priority. Sets email priority. Parameters$priority intReturnsMail provides a fluent interface
|
public
int
|
#
getPriority(
)
Returns email priority. Returns email priority. |
public
Mail
|
#
setHtmlBody(
string|ITemplate
$html,
mixed
$basePath = NULL
)
Sets HTML body. Sets HTML body. Parameters$html string|ITemplate$basePath mixed base-path or FALSE to disable parsingReturnsMail provides a fluent interface
|
public
mixed
|
#
getHtmlBody(
)
Gets HTML body. Gets HTML body. |
public
MailMimePart
|
#
addEmbeddedFile(
string
$file,
string
$content = NULL,
string
$contentType = NULL
)
Adds embedded file. Adds embedded file. Parameters$file string$content string$contentType string |
public
MailMimePart
|
#
addAttachment(
string
$file,
string
$content = NULL,
string
$contentType = NULL
)
Adds attachment. Adds attachment. Parameters$file string$content string$contentType string |
public
void
|
#
send(
)
Sends email. Sends email. |
public
Mail
|
#
setMailer(
IMailer
$mailer
)
Sets the mailer. Sets the mailer. Parameters$mailer IMailerReturnsMail provides a fluent interface
|
public
IMailer
|
#
getMailer(
)
Returns mailer. Returns mailer. |
public
string
|
#
generateMessage(
)
Returns encoded message. Returns encoded message. |
protected
Mail
|
#
build(
)
Builds email. Does not modify itself, but returns a new object. Builds email. Does not modify itself, but returns a new object. |
protected
void
|
#
buildHtml(
)
Builds HTML content. Builds HTML content. |
protected
void
|
#
buildText(
)
Builds text content. Builds text content. |
Methods Inherited From MailMimePart
setHeader(), getHeader(), clearHeader(), getEncodedHeader(), getHeaders(), setContentType(), setEncoding(), getEncoding(), addPart(), setBody(), getBody(), generateMessage(), encodeQuotedPrintable()
Methods Inherited From Object
getReflection(), __call(), __callStatic(), extensionMethod(), __get(), __set(), __isset(), __unset()
Constants Inherited From MailMimePart
ENCODING_BASE64, ENCODING_7BIT, ENCODING_8BIT, ENCODING_QUOTED_PRINTABLE, EOL, LINE_LENGTH