Class NMail (namespace NMail)
NMail provides functionality to compose and send both text and MIME-compliant multipart e-mail messages.
NObject | --NMailMimePart | --NMail
Public Method Summary | |
---|---|
NMail |
__construct
()
|
NMailMimePart |
Adds attachment.
|
NMail |
addBcc
(string $email, [string $name =
NULL ])
Adds blind carbon copy email recipient.
|
NMail |
addCc
(string $email, [string $name =
NULL ])
Adds carbon copy email recipient.
|
NMailMimePart |
Adds embedded file.
|
NMail |
addReplyTo
(string $email, [string $name =
NULL ])
Adds the reply-to address.
|
NMail |
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.
|
NMail |
setFrom
(string $email, [string $name =
NULL ])
Sets the sender of the message.
|
NMail |
Sets HTML body.
|
NMail |
Sets the mailer.
|
NMail |
setPriority
(int $priority)
Sets email priority.
|
NMail |
setReturnPath
(string $email)
Sets the Return-Path header of the message.
|
NMail |
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 NMailMimePart |
---|
addPart(), clearHeader(), encodeQuotedPrintable(), generateMessage(), getBody(), getEncodedHeader(), getEncoding(), getHeader(), getHeaders(), setBody(), setContentType(), setEncoding(), setHeader() |
Methods Inherited From NObject |
---|
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 NMailMimePart |
---|
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 | 'NSendmailMailer' |
line 48 |
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 76 __constructpublic NMail __construct ()
|
||||||||||||||||||
line 309 addAttachmentpublic NMailMimePart addAttachment (string $file, [string $content = Adds attachment.
|
||||||||||||||||||
line 183 addBccpublic NMail addBcc (string $email, [string $name = Adds blind carbon copy email recipient.
|
||||||||||||||||||
line 169 addCcpublic NMail addCc (string $email, [string $name = Adds carbon copy email recipient.
|
||||||||||||||||||
line 289 addEmbeddedFilepublic NMailMimePart addEmbeddedFile (string $file, [string $content = Adds embedded file.
|
||||||||||||||||||
line 117 addReplyTopublic NMail addReplyTo (string $email, [string $name = Adds the reply-to address.
|
||||||||||||||||||
line 155 addTopublic NMail 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 NMail setFrom (string $email, [string $name = Sets the sender of the message.
|
||||||||||||||||||
line 262 setHtmlBodypublic NMail setHtmlBody (string|ITemplate $html, [mixed $basePath = Sets HTML body.
|
||||||||||||||||||
line 360 setMailerpublic NMail setMailer (IMailer $mailer) Sets the mailer.
|
||||||||||||||||||
line 237 setPrioritypublic NMail setPriority (int $priority) Sets email priority.
|
||||||||||||||||||
line 213 setReturnPathpublic NMail setReturnPath (string $email) Sets the Return-Path header of the message.
|
||||||||||||||||||
line 130 setSubjectpublic NMail setSubject (string $subject) Sets the subject of the message.
|