Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NMail
  • NMailMimePart
  • NSendmailMailer

Interfaces

  • IMailer
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NMail

Mail provides functionality to compose and send both text and MIME-compliant multipart e-mail messages.

NObject
Extended by NMailMimePart
Extended by NMail
Package: Nette\Mail
Author: David Grudl
Located at Mail/Mail.php
Methods summary
public
# __construct( )
public NMail
# setFrom( string $email, string $name = NULL )

Sets the sender of the message.

Sets the sender of the message.

Parameters

$email
string
e-mail or format "John Doe" <doe@example.com>
$name
string

Returns

NMail
provides a fluent interface
public array
# getFrom( )

Returns the sender of the message.

Returns the sender of the message.

Returns

array
public NMail
# addReplyTo( string $email, string $name = NULL )

Adds the reply-to address.

Adds the reply-to address.

Parameters

$email
string
e-mail or format "John Doe" <doe@example.com>
$name
string

Returns

NMail
provides a fluent interface
public NMail
# setSubject( string $subject )

Sets the subject of the message.

Sets the subject of the message.

Parameters

$subject
string

Returns

NMail
provides a fluent interface
public string
# getSubject( )

Returns the subject of the message.

Returns the subject of the message.

Returns

string
public NMail
# addTo( string $email, string $name = NULL )

Adds email recipient.

Adds email recipient.

Parameters

$email
string
e-mail or format "John Doe" <doe@example.com>
$name
string

Returns

NMail
provides a fluent interface
public NMail
# addCc( string $email, string $name = NULL )

Adds carbon copy email recipient.

Adds carbon copy email recipient.

Parameters

$email
string
e-mail or format "John Doe" <doe@example.com>
$name
string

Returns

NMail
provides a fluent interface
public NMail
# addBcc( string $email, string $name = NULL )

Adds blind carbon copy email recipient.

Adds blind carbon copy email recipient.

Parameters

$email
string
e-mail or format "John Doe" <doe@example.com>
$name
string

Returns

NMail
provides a fluent interface
public NMail
# setReturnPath( string $email )

Sets the Return-Path header of the message.

Sets the Return-Path header of the message.

Parameters

$email
string
e-mail

Returns

NMail
provides a fluent interface
public string
# getReturnPath( )

Returns the Return-Path header.

Returns the Return-Path header.

Returns

string
public NMail
# setPriority( integer $priority )

Sets email priority.

Sets email priority.

Parameters

$priority
integer

Returns

NMail
provides a fluent interface
public integer
# getPriority( )

Returns email priority.

Returns email priority.

Returns

integer
public NMail
# 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 parsing

Returns

NMail
provides a fluent interface
public mixed
# getHtmlBody( )

Gets HTML body.

Gets HTML body.

Returns

mixed
public NMailMimePart
# addEmbeddedFile( string $file, string $content = NULL, string $contentType = NULL )

Adds embedded file.

Adds embedded file.

Parameters

$file
string
$content
string
$contentType
string

Returns

NMailMimePart
public NMailMimePart
# addAttachment( string $file, string $content = NULL, string $contentType = NULL )

Adds attachment.

Adds attachment.

Parameters

$file
string
$content
string
$contentType
string

Returns

NMailMimePart
public
# send( )

Sends e-mail.

Sends e-mail.

public NMail
# setMailer( IMailer $mailer )

Sets the mailer.

Sets the mailer.

Parameters

$mailer
IMailer

Returns

NMail
provides a fluent interface
public IMailer
# getMailer( )

Returns mailer.

Returns mailer.

Returns

IMailer
protected
# build( )

Builds e-mail.

Builds e-mail.

protected
# buildHtml( )

Builds HTML content.

Builds HTML content.

protected
# buildText( )

Builds text content.

Builds text content.

Methods inherited from NMailMimePart
addPart(), clearHeader(), encodeQuotedPrintable(), generateMessage(), getBody(), getEncodedHeader(), getEncoding(), getHeader(), getHeaders(), setBody(), setContentType(), setEncoding(), setHeader()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
integer HIGH 1
#

Priority

Priority

integer NORMAL 3
#
integer LOW 5
#
Constants inherited from NMailMimePart
ENCODING_7BIT, ENCODING_8BIT, ENCODING_BASE64, ENCODING_QUOTED_PRINTABLE
Properties summary
public static IMailer $defaultMailer 'NSendmailMailer'
#
public static array $defaultHeaders array( 'MIME-Version' => '1.0', 'X-Mailer' => 'Nette Framework', )
#
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0