Changeset 1142
- Timestamp:
- 09/24/08 04:26:34 (2 months ago)
- Files:
-
- trunk/lib/AkActionMailer.php (modified) (3 diffs)
- trunk/lib/AkActionMailer/AkMailComposer.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/AkActionMailer.php
r1141 r1142 476 476 unset($attributes['template']); 477 477 } 478 479 if((!empty($attributes['attachment']) || !empty($attributes['attachments'])) &&480 (empty($attributes['parts']) && empty($attributes['part']) && empty($attributes['body']))){481 // we can render here the body if there are attachments482 }483 484 478 $this->Message->set($attributes); 479 480 $this->_setter_has_been_called = true; 485 481 } 486 482 … … 578 574 $this->Message =& $Message; 579 575 } 580 576 581 577 !empty($this->Message) or trigger_error(Ak::t('No mail object available for delivery!'), E_USER_ERROR); 582 578 if(!empty($this->perform_deliveries)){ … … 596 592 'password' => @$this->server_settings['password'], 597 593 'auth' => (!empty($this->server_settings['user_name']) || @$this->server_settings['authentication']), 598 'debug' => true594 //'debug' => true 599 595 ); 600 596 $settings = array_merge($default_settings, $settings); trunk/lib/AkActionMailer/AkMailComposer.php
r977 r1142 136 136 trigger_error(Ak::t('Could not find the method %method on the model %model', array('%method'=>$method_name, '%model'=>$this->ActionMailer->getModelName())), E_USER_ERROR); 137 137 } 138 $this->_setAttributesIfRequired(); 139 } 140 141 function _setAttributesIfRequired() 142 { 143 if(empty($this->ActionMailer->_setter_has_been_called)){ 144 $attributes = array(); 145 foreach ((array)$this->ActionMailer as $k=>$v){ 146 if(gettype($v) != 'object' && $k[0] != '_'){ 147 $attributes[$k] = $v; 148 } 149 } 150 $this->ActionMailer->set($attributes); 151 } 138 152 } 139 153 … … 213 227 214 228 function &_getPartsWithRenderedTemplates() 215 { 229 { 216 230 $templates = $this->_getAvailableTemplates(); 217 231 $alternative_multiparts = array();
