Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcMailVirtualFile

Mail::ezcMailVirtualFile

Class ezcMailVirtualFile

Mail part for binary data in memory.

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

ezcMailPart
   |
   --ezcMailFilePart
      |
      --ezcMailVirtualFile
Version:   //autogen//

Inherited Constants

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

Properties

string read/write $contents
The contents to be added as an attachment. The mimeType and contentType are set in the constructor or if not specified they are extracted with the fileinfo extension if it is available, otherwise they are set to application/octet-stream.

Inherited Member Variables

From ezcMailPart
protected ezcMailPart::$properties

Method Summary

public ezcMailVirtualFile __construct( $fileName , $contents , [ $contentType = null] , [ $mimeType = null] )
Constructs a new attachment with $fileName and $contents.
public string generateBody( )
Returns the contents of the file with the correct encoding.

Inherited Methods

From ezcMailFilePart
public ezcMailFilePart ezcMailFilePart::__construct()
Constructs a new attachment with $fileName.
public string ezcMailFilePart::generate()
Override of the generate() method from ezcMailPart. Used to set headers before generating the part.
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

ezcMailVirtualFile __construct( string $fileName , string $contents , [string $contentType = null] , [string $mimeType = null] )

Constructs a new attachment with $fileName and $contents.

If the $mimeType and $contentType are not specified they are extracted with the fileinfo extension if it is available, otherwise they are set to application/octet-stream.

Parameters:
Name Type Description
$fileName string
$contents string
$contentType string
$mimeType string
Redefinition of:
Method Description
ezcMailFilePart::__construct() Constructs a new attachment with $fileName.

generateBody

string generateBody( )

Returns the contents of the file with the correct encoding.

Redefinition of:
Method Description
ezcMailPart::generateBody() Returns the body of this part as a string.
Documentation generated by phpDocumentor 1.4.3