#5915: Email Component - Accessing the rendered content
---------------------------+------------------------------------------------
    Reporter:  colinodell  |          Type:  Enhancement
      Status:  new         |      Priority:  Medium     
   Milestone:  1.2.x.x     |     Component:  Components 
     Version:  RC4         |      Severity:  Normal     
    Keywords:              |   Php_version:  n/a        
Cake_version:  7945        |  
---------------------------+------------------------------------------------
 The email's body content is rendered when the 'send' method is called.
 However, after the message is sent, the contents aren't stored anywhere
 and disappear into the abyss, making it impossible to capture what was
 sent.  Sure, you could manually call some functions to render it, but why
 bother wasting time doing it twice?
 [[BR]][[BR]]
 Here are a couple solutions:
 [[BR]][[BR]]
  * Instead of returning 'true' on success, return the actual content.
 Continue returning 'false' as usual.
  * Add a parameter to specify if the function should behave as above.  By
 default, it will return the usual true/false, maintaining backwards
 compatibility.
  * Use a public class variable to store the message, which is rendered
 around line 300.
 [[BR]][[BR]]
 Currently, there is no way to capture the rendered message without
 directly modifying the component.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5915>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to