Class Mail (namespace Nette\Mail)
Mail provides functionality to compose and send both text and MIME-compliant multipart e-mail messages.
Object | --MailMimePart | --Mail
Public Method Summary | |
---|---|
__construct
()
|
|
MailMimePart |
Adds attachment.
|
addBcc
(string $email, [string $name =
NULL ])
Adds blind carbon copy email recipient.
|
|
addCc
(string $email, [string $name =
NULL ])
Adds carbon copy email recipient.
|
|
MailMimePart |
Adds embedded file.
|
addReplyTo
(string $email, [string $name =
NULL ])
Adds the reply-to address.
|
|
addTo
(string $email, [string $name =
NULL ])
Adds email recipient.
|
|
array |
getFrom
()
Returns the sender of the message.
|
mixed |
getHtmlBody
()
Gets HTML body.
|
IMailer |
getMailer
()
Returns mailer.
|
int |
getPriority
()
Returns email priority.
|
string |
Returns the Return-Path header.
|
string |
getSubject
()
Returns the subject of the message.
|
void |
send
()
Sends e-mail.
|
setFrom
(string $email, [string $name =
NULL ])
Sets the sender of the message.
|
|
setHtmlBody
(string|Nette\Templates\ITemplate $html, [mixed $basePath =
NULL ])
Sets HTML body.
|
|
Sets the mailer.
|
|
setPriority
(int $priority)
Sets email priority.
|
|
setReturnPath
(string $email)
Sets the Return-Path header of the message.
|
|
setSubject
(string $subject)
Sets the subject of the message.
|
Protected Method Summary | |
---|---|
protected void |
build
()
Builds e-mail.
|
protected void |
buildHtml
()
Builds HTML content.
|
protected void |
buildText
()
Builds text content.
|
Methods Inherited From MailMimePart |
---|
addPart(), clearHeader(), encodeQuotedPrintable(), generateMessage(), getBody(), getEncodedHeader(), getEncoding(), getHeader(), getHeaders(), setBody(), setContentType(), setEncoding(), setHeader() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Constant Summary | |||
---|---|---|---|
int | HIGH |
1 |
line 42 Priority |
int | LOW |
5 |
line 44 Priority |
int | NORMAL |
3 |
line 43 Priority |
Constants Inherited From MailMimePart |
---|
ENCODING_7BIT, ENCODING_8BIT, ENCODING_BASE64, ENCODING_QUOTED_PRINTABLE |
Variable Summary | ||||
---|---|---|---|---|
static array | $defaultHeaders | array(
'MIME-Version' => '1.0',
'X-Mailer' => 'Nette Framework',
) |
line 51 |
|
static IMailer | $defaultMailer | 'Nette\Mail\SendmailMailer' |
line 48 |
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 76 __constructpublic Mail __construct ()
|
||||||||||||||||||
line 309 addAttachmentpublic MailMimePart addAttachment (string $file, [string $content = Adds attachment.
|
||||||||||||||||||
line 183 addBccpublic Mail addBcc (string $email, [string $name = Adds blind carbon copy email recipient.
|
||||||||||||||||||
line 169 addCcpublic Mail addCc (string $email, [string $name = Adds carbon copy email recipient.
|
||||||||||||||||||
line 289 addEmbeddedFilepublic MailMimePart addEmbeddedFile (string $file, [string $content = Adds embedded file.
|
||||||||||||||||||
line 117 addReplyTopublic Mail addReplyTo (string $email, [string $name = Adds the reply-to address.
|
||||||||||||||||||
line 155 addTopublic Mail addTo (string $email, [string $name = Adds email recipient.
|
||||||||||||||||||
line 387 buildprotected void build () Builds e-mail.
|
||||||||||||||||||
line 436 buildHtmlprotected void buildHtml () Builds HTML content.
|
||||||||||||||||||
line 467 buildTextprotected void buildText () Builds text content.
|
||||||||||||||||||
line 104 getFrompublic array getFrom () Returns the sender of the message.
|
||||||||||||||||||
line 275 getHtmlBodypublic mixed getHtmlBody () Gets HTML body.
|
||||||||||||||||||
line 372 getMailerpublic IMailer getMailer () Returns mailer.
|
||||||||||||||||||
line 249 getPrioritypublic int getPriority () Returns email priority.
|
||||||||||||||||||
line 225 getReturnPathpublic string getReturnPath () Returns the Return-Path header.
|
||||||||||||||||||
line 142 getSubjectpublic string getSubject () Returns the subject of the message.
|
||||||||||||||||||
line 348 sendpublic void send () Sends e-mail.
|
||||||||||||||||||
line 92 setFrompublic Mail setFrom (string $email, [string $name = Sets the sender of the message.
|
||||||||||||||||||
line 262 setHtmlBodypublic Mail setHtmlBody (string|Nette\Templates\ITemplate $html, [mixed $basePath = Sets HTML body.
|
||||||||||||||||||
line 360 setMailerpublic Mail setMailer (IMailer $mailer) Sets the mailer.
|
||||||||||||||||||
line 237 setPrioritypublic Mail setPriority (int $priority) Sets email priority.
|
||||||||||||||||||
line 213 setReturnPathpublic Mail setReturnPath (string $email) Sets the Return-Path header of the message.
|
||||||||||||||||||
line 130 setSubjectpublic Mail setSubject (string $subject) Sets the subject of the message.
|