Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorfixxxer
    Hi everybody,

    In my current project, it's now time to send confirmation email to my users. I've read the documentation in the AkActionMailer class and tried the example there and I got this:

    Fatal error: Class 'AkActionMailer' not found in .../trunk/app/models/notifier.php on line 2

    I've look in several places and I've seen that AkDispatcher is not including this class. Maybe it's included somewhere else but I didn't find anything useful.

    Does someone use this class to send email?
    I will continue to search to see what's going on deeper in the Akelos hierarchy but if someone could give me some help, that would really be appreciated.

    • CommentAuthorfixxxer
    okay... once again, it was my own fault...

    At the beginning, I tought that I could use AkActionMailer as a model so I put my new model in the var $models of my controller... Wrong! So, that's where the error was coming from.

    So, for those who are looking at sending email, you just have to follow the instructions from the AkActionMailer class.
    • CommentAuthorfixxxer
    One last thing, wouldn't be a good thing to add the comments at the beginning of the AkActionMailer class in the Wiki? I looked at this part and it's currently empty.

    any thoughts?
    • CommentAuthordelia
    hi fixxxer,
    perhaps you could help me with the AkActionMailer class. Have you got an example of how to use it? I have followed the instructions at the beginning of the AkActionMailer class but i cant make it to work.
    I get this error:

    Notice: Undefined property: AkMailMessage::$recipients in D:\Mis desarrollos\php\akelos_framework\lib\AkActionMailer\AkMailMessage.php on line 50

    Warning: Invalid argument supplied for foreach() in D:\Mis desarrollos\php\akelos_framework\lib\AkActionMailer\AkActionMailerQuoting.php on line 111

    thanks in advance
    • CommentAuthordelia
    it seems that the declaration of the properties/vars ($recipients and $subject) in AkMailBase are missing, so i got the error ........... must i configure the server in any way to avoid that?

    • CommentAuthorinsanet

    it works fine for me. here it is an extract:

      $user =& new User();
      $user->email = 'nice_person@hotmail.com'; 
      $Notifier = new Notifier(); 
      $Notifier->deliver('welcomemail', $user); 
      class Notifier extends AkActionMailer
    function welcomemail($User){ 
        'recipients' => $User->email, 
        'from' => 'accounts@example.com', 
        'subject' => 'Thank you for registering with our website', 
        'body' => array( 'User' => $User ) 

    and you can use sintags or just text in the template, so this should work ok.

    • CommentAuthordelia
    thanks for answering, insanet.

    My code is like exactly like yours, but i get the error

    Notice: Undefined property: AkMailMessage::$subject in ..... lib\AkActionMailer\AkMailMessage.php on line 121
    The same happens with the property recipients.

    If i declare this properties in the class AkMailBase it seems to work, so i think there must be something in the PHP configuration or similar that allow the use of the properties without the need of declaring it (as var $subject)..

    • CommentAuthorGKSR
    hello, when i am trying to send an email , I am getting the following error.

    Error: Warning: touch() [function.touch]: Utime failed: Operation not permitted in /opt/lampp/htdocs/akelos/lib/AkConfig.php on line 159


    function _setCacheValidity($namespace, $environment)
    $cacheFilename = $this->_generateCacheFileName($namespace,$environment);
    $configFilename = $this->_generateConfigFileName($namespace,$environment);
    touch($cacheFilename,filemtime($configFilename)); // Line #159


    $user->body = $this->params['contactus']['message'];
    $Notifier = new Notifier();
    $Notifier->deliver('contactus' , $user);

    Even I have given full permissions(chmod 777) to my application.
    Can any tell what went wrong?