Public Member Functions | Public Attributes | Protected Attributes

MailMessage Class Reference

Mail message content. More...

Inheritance diagram for MailMessage:
BeditaContentModel BEAppObjectModel BEAppModel AppModel

List of all members.

Public Member Functions

 beforeValidate ()
 getCompleteSender ($id=null, $senderEmail=null, $senderName=null)
 return a complete sender email address "sender name <sender@bedita.com>

Public Attributes

 $actsAs
 $hasOne
 $hasAndBelongsToMany
 $validate

Protected Attributes

 $modelBindings

Detailed Description

Mail message content.

Definition at line 25 of file mail_message.php.


Member Function Documentation

MailMessage::getCompleteSender ( id = null,
senderEmail = null,
senderName = null 
)

return a complete sender email address "sender name <sender@bedita.com>

Parameters:
int $id MailMessage.id (if not empty use MailMessage.id otherwise use the others parameters)
string $senderEmail
string $senderName
Returns:
mixed, false if it's not find any email

Definition at line 128 of file mail_message.php.


Member Data Documentation

MailMessage::$actsAs
Initial value:
 array(
            'CompactResult'         => array("MailGroup"),
            'ForeignDependenceSave' => array('Content'),
            'DeleteObject'          => 'objects',
    )

Reimplemented from BEAppObjectModel.

Definition at line 27 of file mail_message.php.

MailMessage::$hasAndBelongsToMany
Initial value:
 array(
            'MailGroup' =>  array (
                    'joinTable' => 'mail_group_messages'
                )
    )

Definition at line 48 of file mail_message.php.

MailMessage::$hasOne
Initial value:
 array(
            'BEObject' => array(
                    'className'     => 'BEObject',
                    'conditions'   => '',
                    'foreignKey'    => 'id',
                    'dependent'     => true
                ),
            'Content' => array(
                    'className'     => 'Content',
                    'conditions'   => '',
                    'foreignKey'    => 'id',
                    'dependent'     => true
                )
        )

Reimplemented from BEAppObjectModel.

Definition at line 33 of file mail_message.php.

MailMessage::$modelBindings [protected]
Initial value:
 array(
        "detailed" => array(
            "BEObject" => array(
                "ObjectType",
                "UserCreated",
                "UserModified",
                "Permission",
                "RelatedObject",
                "Annotation",
                "Version" => array("User.realname", "User.userid")
            ),
            "Content",
            "MailGroup"
        ),
        "default" => array(
            "BEObject" => array("ObjectType", "RelatedObject"),
            "Content"
        ),
        "mailgroup" => array("MailGroup"),
        "minimum" => array(
            "BEObject" => array("ObjectType"),
            "Content"
        )
    )

Reimplemented from BEAppModel.

Definition at line 54 of file mail_message.php.

MailMessage::$validate
Initial value:
 array(
        "subject" => array(
            "rule"          => array('custom', '/.+/') ,
            "required"      => true,
            "message"       => "Subject required"
        ),
        
        "sender" => array(
            "rule"  => "email",
            "required" => true,
            "message"   => "Please supply a valid email address."
        ),
        "reply_to" => array(
            "rule" => "email",
            "allowEmpty" => true,
            "message"   => "Please supply a valid email address."
        ),
        "bounce_to" => array(
            "rule" => "email",
            "allowEmpty" => true,
            "message"   => "Please supply a valid email address."
        )
    )

Definition at line 79 of file mail_message.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:47 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus