category OSS
package OSS_Mail
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Constructor

__construct($charSet) : void

Calls Zend_Mail::__construct().

Parameters

$charSet

Takes a string and returns with a more RFC compatible version of it.

amendString(string $string) : string

Takes care of the UTF-8 characters and most importantly the double quotes, which can cause serious issues if appear in from, to, cc, bcc or returnto. Automatically called by send() where necessary.

Parameters

$string

string

Returns

string

Attaches or embeds a file to/into an email.

attachFile(string $filePath, boolean $embed) : boolean

Embedding the images into an HTML letter happens automatically.

Parameters

$filePath

string

the path to the file to attach

$embed

boolean

default false if true then the file will be embedded instead of attached

Returns

boolean

Takes a file extension WITHOUT the leading dot and returns with the corresponding MIME type.

getMimeByExtension(string $extension) : string

Please note that a good few file formats have more than one MIME types, depending on the OS or the browser, etc, but this method only returns with the "best", most compatible one. Returns with "application/octet-stream" if did not find a matching MIME type.

Parameters

$extension

string

Returns

string

This method takes an array of parameters, and sends out the email.

sendMail(array $params) : object: void

Throws a Zend_Mail_Exception on error. Returns with a Zend_Mail object on success. The images in the HtmlBody will automatically be embedded.

Parameters

$params

array

Exceptions

\Zend_Mail_Exception

Returns

objectZend_Mail

 Properties

 

Array of mime types

$_mimeTypes : array

 Constants

 

ERR_INSUFFICIENT_DATA

ERR_INSUFFICIENT_DATA