[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 /********************************************************************************* 3 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 ********************************************************************************/ 10 require_once ("modules/Emails/mail.php"); 11 12 13 $mail_status = send_mail('Emails',$_REQUEST["parent_name"],$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST["ccmail"],$_REQUEST["bccmail"],'all',$focus->id); 14 15 $query = 'update vtiger_emaildetails set email_flag ="SENT" where emailid='.$focus->id; 16 $adb->query($query); 17 18 //set the errorheader1 to 1 if the mail has not been sent to the assigned to user 19 if($mail_status != 1) { //when mail send fails 20 $errorheader1 = 1; 21 $mail_status_str = $to_email."=".$mail_status."&&&"; 22 23 } elseif($mail_status == 1 && $to_email == '') { //Mail send success only for CC and BCC but the 'to' email is empty 24 $adb->query($query); 25 $errorheader1 = 1; 26 $mail_status_str = "cc_success=0&&&"; 27 } else 28 $mail_status_str = $to_email."=".$mail_status."&&&"; 29 30 31 32 //Added to redirect the page to Emails/EditView if there is an error in mail sending 33 if($errorheader1 == 1 || $errorheader2 == 1) 34 { 35 $returnset = 'return_module='.$returnmodule.'&return_action='.$returnaction.'&return_id='.$_REQUEST['return_id']; 36 $returnmodule = 'Emails'; 37 $returnaction = 'EditView'; 38 if($_REQUEST['mode'] == 'edit') 39 $returnid = $_REQUEST['record']; 40 else 41 $returnid = $_REQUEST['currentid']; 42 } 43 44 //The following function call is used to parse and form a encoded error message and then pass to result page 45 $mail_error_str = getMailErrorString($mail_status_str); 46 $adb->println("Mail Sending Process has been finished.\n\n"); 47 48 if(isset($_REQUEST['popupaction']) && $_REQUEST['popupaction'] != '') 49 { 50 $inputs="<script>window.self.close();</script>"; 51 echo $inputs; 52 } 53 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |