phpDocumentor openbiz.bin.service
[ class tree: openbiz.bin.service ] [ index: openbiz.bin.service ] [ all elements ]

Class: emailService

Source Location: /service/emailService.php

Class emailService

Class Overview

The email service provides access to a Zend_Mail object in conjunction with a predefined email account.

One can simply request the configured email object and work directly with the Zend_Mail API or use one of several convenience functions. Additional functions bundled with the class are to run email through a template filter or to log attempted emails to a text file or DB Table.

Located in /service/emailService.php [line 33]

MetaObject
   |
   --emailService
Author(s):
  • Rocky Swen
API Tags:
Access:  public

Information Tags:
Copyright:  Copyright (c) 2005-2009, Rocky Swen

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Property Summary
array   $m_Accounts   An array of Account objects
unknown_type   $m_UseAccount   The default account to be used when issuing email

[ Top ]
Method Summary
void   __construct()   Initialize emailService with xml array metadata
string   GetErrorMsg()   Get error message
mixed   LogEmail()   Log that an email attemp was made.
void   ReadMetadata()   Read array meta-data, and store to meta-object
boolean   SendEmail()   A convenience function that will issue an email based on the parameter provided Will log email attempts but will NOT run the body through a template
boolean   UseAccount()   Will set the Default Transport object for the mail object based on the supplied accountname

[ Top ]
Properties
array   $m_Accounts = null [line 40]

An array of Account objects

API Tags:
Access:  public


[ Top ]
unknown_type   $m_UseAccount [line 54]

The default account to be used when issuing email

API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 91]

  void __construct( array &$xmlArr  )

Initialize emailService with xml array metadata

Parameters:
array   $xmlArr: 


Redefinition of:
MetaObject::__construct()

[ Top ]
GetErrorMsg  [line 124]

  string GetErrorMsg( )

Get error message


API Tags:
Access:  public


[ Top ]
LogEmail  [line 239]

  mixed LogEmail( mixed $result, string $subject, [mixed $body = NULL], [mixed $TOs = NULL], [array $CCs = NULL], [array $BCCs = NULL], array $To  )

Log that an email attemp was made.

We assume it was successfull, since Zend_Mail throws an exception otherwise

Parameters:
string   $subject: 
array   $To: 
array   $CCs: 
array   $BCCs: 

API Tags:
Return:  boolean|string|void
Access:  public


[ Top ]
ReadMetadata  [line 107]

  void ReadMetadata( array &$xmlArr  )

Read array meta-data, and store to meta-object

Parameters:
array   $xmlArr: 

API Tags:
Access:  protected


[ Top ]
SendEmail  [line 185]

  boolean SendEmail( [array $TOs = null], [array $CCs = null], [array $BCCs = null], array $subject, array $body, [array $attachments = null], [boolean $isHTML = false]  )

A convenience function that will issue an email based on the parameter provided Will log email attempts but will NOT run the body through a template

Parameters:
array   $TOs: 
array   $CCs: 
array   $BCCs: 
array   $subject: 
array   $body: 
array   $attachments: 
boolean   $isHTML: 

API Tags:
Return:  - TRUE on success, FALSE on failure
Access:  public


[ Top ]
UseAccount  [line 146]

  boolean UseAccount( string $accountName  )

Will set the Default Transport object for the mail object based on the supplied accountname

Parameters:
string   $accountName: 

API Tags:
Return:  TRUE/FALSE
Access:  public


[ Top ]

Documentation generated on Tue, 22 Dec 2009 03:02:55 -0800 by phpDocumentor 1.3.0RC3