Namespaces

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

Classes

  • Mail
  • MailMimePart
  • SendmailMailer

Interfaces

  • IMailer
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class Mail

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

Nette\Object
Extended by Nette\Mail\MailMimePart
Extended by Nette\Mail\Mail
Namespace: Nette\Mail
Author: David Grudl
Located at Mail/Mail.php
Methods summary
public
# __construct( )
public Nette\Mail\Mail
# 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

Nette\Mail\Mail
provides a fluent interface
public array
# getFrom( )

Returns the sender of the message.

Returns the sender of the message.

Returns

array
public Nette\Mail\Mail
# 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

Nette\Mail\Mail
provides a fluent interface
public Nette\Mail\Mail
# setSubject( string $subject )

Sets the subject of the message.

Sets the subject of the message.

Parameters

$subject
string

Returns

Nette\Mail\Mail
provides a fluent interface
public string
# getSubject( )

Returns the subject of the message.

Returns the subject of the message.

Returns

string
public Nette\Mail\Mail
# 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

Nette\Mail\Mail
provides a fluent interface
public Nette\Mail\Mail
# 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

Nette\Mail\Mail
provides a fluent interface
public Nette\Mail\Mail
# 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

Nette\Mail\Mail
provides a fluent interface
public Nette\Mail\Mail
# 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

Nette\Mail\Mail
provides a fluent interface
public string
# getReturnPath( )

Returns the Return-Path header.

Returns the Return-Path header.

Returns

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

Sets email priority.

Sets email priority.

Parameters

$priority
integer

Returns

Nette\Mail\Mail
provides a fluent interface
public integer
# getPriority( )

Returns email priority.

Returns email priority.

Returns

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

Sets HTML body.

Sets HTML body.

Parameters

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

Returns

Nette\Mail\Mail
provides a fluent interface
public mixed
# getHtmlBody( )

Gets HTML body.

Gets HTML body.

Returns

mixed
public Nette\Mail\MailMimePart
# 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\MailMimePart
public Nette\Mail\MailMimePart
# addAttachment( string $file, string $content = NULL, string $contentType = NULL )

Adds attachment.

Adds attachment.

Parameters

$file
string
$content
string
$contentType
string

Returns

Nette\Mail\MailMimePart
public
# send( )

Sends e-mail.

Sends e-mail.

public Nette\Mail\Mail
# setMailer( Nette\Mail\IMailer $mailer )

Sets the mailer.

Sets the mailer.

Parameters

$mailer
Nette\Mail\IMailer

Returns

Nette\Mail\Mail
provides a fluent interface
public Nette\Mail\IMailer
# getMailer( )

Returns mailer.

Returns mailer.

Returns

Nette\Mail\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 Nette\Mail\MailMimePart
addPart(), clearHeader(), generateMessage(), getBody(), getEncodedHeader(), 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
#
integer LOW 5
#
Constants inherited from Nette\Mail\MailMimePart
ENCODING_7BIT, ENCODING_8BIT, ENCODING_BASE64, ENCODING_QUOTED_PRINTABLE
Properties summary
public static Nette\Mail\IMailer $defaultMailer 'Nette\Mail\SendmailMailer'
#
public static array $defaultHeaders array( 'MIME-Version' => '1.0', 'X-Mailer' => 'Nette Framework', )
#
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0