API Documentation

Zend/Mail/Transport/Abstract.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Mail  
Subpackage
Transport  
Version
$Id: Abstract.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Mail_Transport_Abstract

Package: Zend\Mail\Transport

Abstract for sending eMails through different ways of transport

Children
\Zend_Mail_Transport_Sendmail
\Zend_Mail_Transport_Smtp
\Zend_Mail_Transport_File
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertypublicstring  $EOL= '"\r\n"'

EOL character string used by transport

Default value"\r\n"Details
Type
string
Access
public  
Propertyprotectedarray  $_headers= 'array()'

Array of message headers

Default valuearray()Details
Type
array
Access
protected  
Propertyprotectedboolean  $_isMultipart= 'false'

Message is a multipart message

Default valuefalseDetails
Type
boolean
Access
protected  
Propertyprotectedfalse|\Zend_Mail  $_mail= 'false'

Zend_Mail object

Default valuefalseDetails
Type
false\Zend_Mail
Access
protected  
Propertyprotectedarray  $_parts= 'array()'

Array of message parts

Default valuearray()Details
Type
array
Access
protected  
Propertypublicstring  $body= ''''

Mail body

Default value''Details
Type
string
Access
public  
Propertypublicstring  $boundary= ''''

MIME boundary

Default value''Details
Type
string
Access
public  
Propertypublicstring  $header= ''''

Mail header string

Default value''Details
Type
string
Access
public  
Propertypublicstring  $recipients= ''''

Recipients string

Default value''Details
Type
string
Access
public  

Methods

methodprotected_buildBody( ) : void

Generate MIME compliant message from the current configuration

If both a text and HTML body are present, generates a multipart/alternative Zend_Mime_Part containing the headers and contents of each. Otherwise, uses whichever of the text or HTML parts present.

The content part is then prepended to the list of Zend_Mime_Parts for this message.

methodprotected_formatHeader( string $item, string $key, string $prefix ) : void
static

Prepend header name to header value

Parameters
Name Type Description
$item string
$key string
$prefix string
Details
Access
protected  
Static
 
methodprotected_getHeaders( string $boundary ) : array

Return all mail headers as an array

If a boundary is given, a multipart header is generated with a Content-Type of either multipart/alternative or multipart/mixed depending on the mail parts present in the {@link $_mail Zend_Mail object} present.

Parameters
Name Type Description
$boundary string
Returns
Type Description
array
methodprotected_prepareHeaders( mixed $headers ) : void

Prepare header string for use in transport

Prepares and generates {@link $header} based on the headers provided.

Parameters
Name Type Description
$headers mixed
Throws
Exception Description
\Zend_Mail_Transport_Exception if any header lines exceed 998 characters
Details
Access
protected  
methodprotected_sendMail( ) : void
abstract

Send an email independent from the used transport

The requisite information for the email will be found in the following properties:

  • {@link $recipients} - list of recipients (string)
  • {@link $header} - message header
  • {@link $body} - message body
methodpublicsend( \Zend_Mail $mail ) : void

Send a mail using this transport

Parameters
Name Type Description
$mail \Zend_Mail
Throws
Exception Description
\Zend_Mail_Transport_Exception if mail is empty
Details
Access
public  
Documentation was generated by DocBlox 0.15.1.