Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • Message
  • MimePart
  • SendmailMailer
  • SmtpMailer

Interfaces

  • IMailer

Exceptions

  • SmtpException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Message

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

Nette\Object
Extended by Nette\Mail\MimePart
Extended by Nette\Mail\Message
Namespace: Nette\Mail
Author: David Grudl
Located at Mail/Message.php
Methods summary
public
# __construct( )
public Nette\Mail\Message
# 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@example.com>
$name
string

Returns

Nette\Mail\Message
public array
# getFrom( )

Returns the sender of the message.

Returns the sender of the message.

Returns

array
public Nette\Mail\Message
# 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@example.com>
$name
string

Returns

Nette\Mail\Message
public Nette\Mail\Message
# setSubject( string $subject )

Sets the subject of the message.

Sets the subject of the message.

Parameters

$subject
string

Returns

Nette\Mail\Message
public string
# getSubject( )

Returns the subject of the message.

Returns the subject of the message.

Returns

string
public Nette\Mail\Message
# addTo( string $email, string $name = NULL )

Adds email recipient.

Adds email recipient.

Parameters

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

Returns

Nette\Mail\Message
public Nette\Mail\Message
# 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@example.com>
$name
string

Returns

Nette\Mail\Message
public Nette\Mail\Message
# 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@example.com>
$name
string

Returns

Nette\Mail\Message
public Nette\Mail\Message
# setReturnPath( string $email )

Sets the Return-Path header of the message.

Sets the Return-Path header of the message.

Parameters

$email
string
email

Returns

Nette\Mail\Message
public string
# getReturnPath( )

Returns the Return-Path header.

Returns the Return-Path header.

Returns

string
public Nette\Mail\Message
# setPriority( integer $priority )

Sets email priority.

Sets email priority.

Parameters

$priority
integer

Returns

Nette\Mail\Message
public integer
# getPriority( )

Returns email priority.

Returns email priority.

Returns

integer
public Nette\Mail\Message
# setHtmlBody( string|Nette\Templating\ITemplate $html, mixed $basePath = NULL )

Sets HTML body.

Sets HTML body.

Parameters

$html
string|Nette\Templating\ITemplate
$basePath
mixed
base-path or FALSE to disable parsing

Returns

Nette\Mail\Message
public mixed
# getHtmlBody( )

Gets HTML body.

Gets HTML body.

Returns

mixed
public Nette\Mail\MimePart
# addEmbeddedFile( string $file, string $content = NULL, string $contentType = NULL )

Adds embedded file.

Adds embedded file.

Parameters

$file
string
$content
string
$contentType
string

Returns

Nette\Mail\MimePart
public Nette\Mail\MimePart
# addAttachment( string $file, string $content = NULL, string $contentType = NULL )

Adds attachment.

Adds attachment.

Parameters

$file
string
$content
string
$contentType
string

Returns

Nette\Mail\MimePart
public string
# generateMessage( )

Returns encoded message.

Returns encoded message.

Returns

string
protected Nette\Mail\Message
# build( )

Builds email. Does not modify itself, but returns a new object.

Builds email. Does not modify itself, but returns a new object.

Returns

Nette\Mail\Message
protected string
# buildText( $html )

Builds text content.

Builds text content.

Returns

string
Methods inherited from Nette\Mail\MimePart
addPart(), clearHeader(), getBody(), getEncodedHeader(), getEncodedMessage(), getEncoding(), getHeader(), getHeaders(), setBody(), setContentType(), setEncoding(), setHeader()
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
integer HIGH 1
#

Priority

Priority

integer NORMAL 3
#

Priority

Priority

integer LOW 5
#

Priority

Priority

Constants inherited from Nette\Mail\MimePart
ENCODING_7BIT, ENCODING_8BIT, ENCODING_BASE64, ENCODING_QUOTED_PRINTABLE, LINE_LENGTH
Properties summary
public static array $defaultHeaders array( 'MIME-Version' => '1.0', 'X-Mailer' => 'Nette Framework', )
#
Magic properties summary
public string $subject
#
public mixed $htmlBody
#
Magic properties inherited from Nette\Mail\MimePart
$body
Magic properties inherited from Nette\Object
$reflection
Nette 2.2 API documentation generated by ApiGen 2.8.0