Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcMailFilePart

Mail::ezcMailFilePart

Class ezcMailFilePart

Mail part for all forms of binary data.

Source for this file: /Mail/src/parts/file.php

ezcMailPart
   |
   --ezcMailFilePart
Version:   //autogen//
Todo:   MimeType recognition

Descendants

Child Class Description
ezcMailVirtualFile Mail part for binary data in memory.
ezcMailStreamFile Mail part for data in a stream.
ezcMailFile Mail part for binary data from the file system.

Constants

CONTENT_TYPE_APPLICATION = "application" Application content type. Use this if the file non of the other content types match.
CONTENT_TYPE_AUDIO = "audio" Audio content type. Use this if the contents of the file is an audio.
CONTENT_TYPE_IMAGE = "image" Image content type. Use this if the contents of the file is an image.
CONTENT_TYPE_VIDEO = "video" Video content type. Use this if the contents of the file is a video.
DISPLAY_ATTACHMENT = "attachment" Use DISPLAY_ATTACHMENT if you want the file to be displayed as an attachment to the recipients of the mail.
DISPLAY_INLINE = "inline" Use DISPLAY_INLINE if you want the file to be displayed inline in the mail to the recipients.

Properties

int read/write $contentId
The ID of this part. Used for internal links within an email. Setting this also sets the header Content-ID.
string read/write $contentType
The content type of the file. Possible values are: CONTENT_TYPE_IMAGE, CONTENT_TYPE_VIDEO and CONTENT_TYPE_APPLICATION.
string read/write $dispositionType
If the file should be shown inline in the mail or as an attachment. Possible values are: DISPLAY_ATTACHMENT and DISPLAY_INLINE.
string read/write $fileName
The name of the file which is to be attached to the email.
string read/write $mimeType
The mimetype of the file.

Inherited Member Variables

From ezcMailPart
protected ezcMailPart::$properties

Method Summary

public ezcMailFilePart __construct( $fileName )
Constructs a new attachment with $fileName.
public string generate( )
Override of the generate() method from ezcMailPart. Used to set headers before generating the part.

Inherited Methods

From ezcMailPart
public ezcMailPart ezcMailPart::__construct()
Constructs a new mail part.
public void ezcMailPart::appendExcludeHeaders()
The array $headers will be excluded when the headers are generated.
public string ezcMailPart::generate()
Returns the complete mail part including both the header and the body as a string.
public abstract string ezcMailPart::generateBody()
Returns the body of this part as a string.
public string ezcMailPart::generateHeaders()
Returns the headers set for this part as a RFC 822 string.
public mixed ezcMailPart::getHeader()
Returns the RAW value of the header $name.
protected string ezcMailPart::getHeaderCharset()
Returns the charset registered for the header $name.
public void ezcMailPart::setHeader()
Sets the header $name to the value $value and its charset to $charset.
protected void ezcMailPart::setHeaderCharset()
Sets the charset of the header $name to $value.
public void ezcMailPart::setHeaders()
Adds the headers $headers.

Methods

__construct

ezcMailFilePart __construct( string $fileName )

Constructs a new attachment with $fileName.

Parameters:
Name Type Description
$fileName string
Redefinition of:
Method Description
ezcMailPart::__construct() Constructs a new mail part.
Redefined in descendants as:
Method Description
ezcMailVirtualFile::__construct() Constructs a new attachment with $fileName and $contents. 
ezcMailStreamFile::__construct() Constructs a new attachment with $fileName and $stream. 
ezcMailFile::__construct() Constructs a new attachment with $fileName. 

generate

string generate( )

Override of the generate() method from ezcMailPart. Used to set headers before generating the part.

Redefinition of:
Method Description
ezcMailPart::generate() Returns the complete mail part including both the header and the body as a string.
Documentation generated by phpDocumentor 1.4.3