Buenas tardes
Estoy tratando de agregar a mi modulo de Proceso_cotizacion (custom module), la forma de que si creo un valor mande un correo hasta ahora he tratado con logic_hooks y llevo esto:
en el logic_hooks.php
<?php
$hook_array['before_save'] = array();
$hook_array['before_save'][] = array(1, 'notify_user', 'custom/modules/vsc_Proceso_Cotrizacion/notify_user.php', 'notify_user', 'notify_user');
?>
y en notify_user.php llevo esto
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class notify_user
{
function notify_user(&$bean, $event, $arguments)
{
require_once("include/SugarPHPMailer.php");
$note_msg=new SugarPHPMailer();
$admin = new Administration();
$admin->retrieveSettings();
$note_msg->Subject = 'Note: ' . $bean->name;
$note_msg->prepForOutbound();
$note_msg->setMailerForSystem();
$note_msg->Body = $bean->status_ventas;
$note_msg->From = $admin->settings['notify_fromaddress'];
$note_msg->FromName = $admin->settings['notify_fromname'];
$$note_msg->AddAddress('cmg@lat.com.mx')
}
}
?>
no se cual es mi error trato de arreglarlo peor todavia no se por que no me sale nada me manda un erorr en el alrchivo en la linea 22


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks