Monday 19 September 2005 11:17:14 am
Hi vytis, You can make custom extension, xhtml form, send post data to one of module view. Modify code below and fetch assigned Guru`s e-mail (you did now write, how is assigned), and send e-mail. Example code can look:
<?php
include_once( 'lib/ezutils/classes/ezmail.php' );
include_once( 'lib/ezutils/classes/ezmailtransport.php' );
include_once( 'lib/ezutils/classes/ezhttptool.php' );
$http =& eZHTTPTool::instance();
//Current user data
$user =& eZUser::currentuser();
$object =& $user->attribute( 'contentobject' );
//Receiver
$receiver = $object->attribute( 'assigned_guru_email' );
//E-mail sender
$emailSender = $user->atribute( 'email' );
//Message
$body = $http->postVariable( 'text' );
$mail = new eZMail
$mail->setReceiver( $receiver );
$mail->setSender( $emailSender );
$mail->setBody( $body );
$mailResult = eZMailTransport::send( $mail );
?>
This code needs some modifications but, should give you right point. Good luck.
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|