yana

Description
  Class trees
  Index of elements
  Todo List
core
  Classes
    FormCreator
    Index
    Language
    Object
    Plugin
    PluginManager
    Singleton
    SmartTemplate
    SmartView
    Utility
    Yana
database
  Classes
    DbBlob
    DbCreator
    DbDesigner4
    DbExtractor
    DbQuery
    DbQueryParser
    DbServer
    DbStream
    DbStructure
    FileDb
error_reporting
  Classes
    Alert
    Error
    ErrorUtility
    Log
    Message
    Report
    Warning
file_system
  Classes
    DatFile
    Dir
    Executeable
    File
    FileReadonly
    FileSystemResource
    SML
javascript
  Classes
    AjaxRequest
  Functions
    preview
    yanaAddEventListener
    yanaAddIcon
    yanaCheckEmbTags
    yanaCloseAll
    yanaGetCookie
    yanaGetElementsByClassName
    yanaMaxLength
    yanaMenu
    yanaMenuCookie
    yanaSetCookie
mail
  Classes
    FormMailer
    Mailer
plugins
  Classes
    plugin_blog
    plugin_check
    plugin_db_admin
    plugin_db_tools
    plugin_default_library
    plugin_diagnostics
    plugin_guestbook
    plugin_guestbook_admin
    plugin_ipblock
    plugin_ipblock_admin
    plugin_rss
    plugin_rss_admin
    plugin_sdk
    plugin_search
    plugin_search_admin
    plugin_user
    plugin_user_admin
utilities
  Classes
    Brush
    Counter
    Hashtable
    Image
    Microsummary
    RSS
    RSSitem
    String
  Functions
    checkArgumentList
    cloneArray
    dirlist
    qSearchArray
    untaintInput
    XMLencode
vdrive
  Classes
    Registry
    VDrive
zip
  Classes
    PclZip

phpDocumentor v 1.4.0

YANA Framework for PHPDocs For Class Mailer

### Class Mailer

#### Description

create and send mails based on templates

- access: public

    Object
       |
       --SmartTemplate
          |
          --Mailer

##### Variable Summary

string $sender
string $subject

##### Method Summary

- bool mail (string $recipient, string $subject, string $text, [array $header = array()])
- bool send (string $recipient)

#### Variables

##### string $sender = ""

- access: public

##### string $subject = ""

- access: public

#### Methods

##### send an e.mail

bool mail (
string $recipient, string $subject, string $text, [array $header = array()]
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$recipient | string | mail address
$subject | string | short description
$text | string | message text
$header | array | (optional)

###### Description:

This function sends an e.mail and lets you provide the recipient, subject, text and header.
Note that this method introduces several filters to prevent header-injection attacks, that might be used to send spam mails.
Due to this feature, this method should be prefered over of PHP's native mail() function in any productive environment.
One should note that the 4th parameter, containing the header-information, is an associative array here, rather than a string.
This means, you need to write this parameter as follows:

1. $header = array(
2. 'from' => $senderMail,
3. 'cc' => $theOtherGuy,
4. 'content-type' => 'text/plain; charset=ISO-8859-1'
5. );
6. Mailer::mail($recipient, $subject, $text, $header);
7. // instead of:
8. $header = "from: $senderMail;\n";
9. $header .= "cc: $theOtherGuy;\n";
10. $header .= "content-type: text/plain; charset=ISO-8859-1;\n";
11. mail($recipient, $subject, $text, $header);

- Note that for security reasons the $header parameter does not allow recipients to be defined using 'bcc'. You should use 'cc' instead.
- Also note that the default encoding for mails send via this method is plain text in ISO Latin-1. You may change this via the $header var 'content-type'.
- When sending HTML-mails the following tags will automatically be removed for security reasons: link, meta, script, style, img, embed, object, param. In addition any '@' sign within the subject or text of the message will be replaced by the phrase "[at]". As this is a blacklist approach, it is not completely failproof. You are encouraged to prepend additional checks as you see fit, before passing your params to this method.
- When recieving a mail send via this method, you might want to check the mail's header for two flags named 'x-yana-php-header-protection' and 'x-yana-php-spam-protection'. The first indicates the result of the header-injection checks. It's value should be '0'. If the value is '1', than some filter did note some suspicious header data and dropped it, before sending the mail. This might be the result of an header-injection attack. The number is followed by a white-space and a description in round brackets, e.g. "0 (no suspicious header found)". The second indicates the result of the spam-protection checks. You may preset both values if you want to run your own filters before passing values to this method. In addition you might want to tell your local spam-filter to sort out any messages, that have these parameters set to '1'.

See the developer's cookbook for more detailed information and examples.

- since: 2.8
- access: public
- uses: Mailer::mail('recipient@somewhere.tld', - 'My Subject', 'My Text', array('from' => 'myMail@domain.tld'));

##### send an e.mail

bool send (
string $recipient
)

###### List of parameters:

Name | Type | Description
--- | --- | ---
$recipient | string | mail address

###### Description:

This function sends an e.mail with the currently set subject and content to the recipient you provide.

- since: 2.8
- access: public
- uses: $mailer->send('recipient@somewhere.tld');

##### inherited from base classes

Inherited From SmartTemplate

- SmartTemplate::SmartTemplate()
- SmartTemplate::equals()
- SmartTemplate::get()
- SmartTemplate::getPath()
- SmartTemplate::getSmarty()
- SmartTemplate::insert()
- SmartTemplate::insertByReference()
- SmartTemplate::insertFile()
- SmartTemplate::setFunction()
- SmartTemplate::setPath()
- SmartTemplate::unsetFunction()
- SmartTemplate::write()

Inherited From Object

- Object::cloneObject()
- Object::equals()
- Object::getClass()
- Object::serialize()
- Object::toString()

Documentation generated on Sun, 04 Jan 2009 03:49:05 +0100 by phpDocumentor 1.4.0

yana author: Thomas Meyerwww.yanaframework.net