[Vtigercrm-commits] [vtiger-commits] r10911 - in /vtigercrm/branches/5.0.3: Smarty/templates/ComposeEmail.tpl modules/Emails/EditView.php modules/Emails/Save.php modules/Emails/webmailsend.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 14 09:12:39 EDT 2007
Author: richie
Date: Mon May 14 07:12:27 2007
New Revision: 10911
Log:
* Fixed the issue in webmail - reply all, Fixed #3818
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl
vtigercrm/branches/5.0.3/modules/Emails/EditView.php
vtigercrm/branches/5.0.3/modules/Emails/Save.php
vtigercrm/branches/5.0.3/modules/Emails/webmailsend.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ComposeEmail.tpl Mon May 14 07:12:27 2007
@@ -132,6 +132,7 @@
<tr>
<td colspan="3" align="center" valign="top" height="320">
{if $WEBMAIL eq 'true' or $RET_ERROR eq 1}
+ <input type="hidden" name="from_add" value="{$from_add}">
<textarea style="display: none;" class="detailedViewTextBox" id="description" name="description" cols="90" rows="8">{$DESCRIPTION}</textarea>
{else}
<textarea style="display: none;" class="detailedViewTextBox" id="description" name="description" cols="90" rows="16">{$elements.3.0}</textarea> {/if}
Modified: vtigercrm/branches/5.0.3/modules/Emails/EditView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/EditView.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/EditView.php Mon May 14 07:12:27 2007
@@ -162,9 +162,21 @@
$webmail->loadMail($array_tab);
$hdr = @imap_headerinfo($mbox, $mailid);
$smarty->assign('WEBMAIL',"true");
+ $temp_id = $MailBox->boxinfo['mail_id'];
+ $smarty->assign('from_add',$temp_id);
if($_REQUEST["reply"] == "all") {
$smarty->assign('TO_MAIL',$webmail->from);
- $smarty->assign('CC_MAIL',str_replace(" ","",$hdr->ccaddress));
+ //added to remove the emailid of webmail client from cc list....to fix the issue #3818
+ $cc_address = '';
+ $cc_array = explode(',',$hdr->ccaddress);
+ for($i=0;$i<count($cc_array);$i++) {
+ if(trim($cc_array[$i]) != trim($temp_id)) {
+ $cc_address .= $cc_array[$i];
+ $cc_address = ($i != (count($cc_array)-1))?($cc_address.','):$cc_address;
+ }
+ }
+ $smarty->assign('CC_MAIL',str_replace(" ","",$cc_address));
+ // fix #3818 ends
/*if(is_array($webmail->cc_list))
{
$smarty->assign('CC_MAIL',implode(",",$webmail->cc_list).",".implode(",",$webmail->to));
@@ -289,6 +301,7 @@
$smarty->assign("FILENAME", $focus->filename);
}
if($ret_error == 1) {
+ require_once('modules/Webmails/MailBox.php');
$smarty->assign("RET_ERROR",$ret_error);
if($ret_parentid != '')
$smarty->assign("IDLISTS",$ret_parentid);
@@ -303,6 +316,10 @@
$smarty->assign("BCC_MAIL",$ret_bccaddress);
if($ret_description != '')
$smarty->assign("DESCRIPTION", $ret_description);
+ $temp_obj = new MailBox($mailbox);
+ $temp_id = $temp_obj->boxinfo['mail_id'];
+ if($temp_id != '')
+ $smarty->assign('from_add',$temp_id);
}
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
Modified: vtigercrm/branches/5.0.3/modules/Emails/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/Save.php Mon May 14 07:12:27 2007
@@ -102,7 +102,7 @@
if(isset($_REQUEST['send_mail']) && $_REQUEST['send_mail']) {
require_once("modules/Emails/mail.php");
if($_REQUEST['parent_id'] == '')
- $user_mail_status = send_mail('Emails',$current_user->column_fields['email1'],$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],'','','all',$focus->id);
+ $user_mail_status = send_mail('Emails',$current_user->column_fields['email1'],$_REQUEST['from_add'],'',$_REQUEST['subject'],$_REQUEST['description'],'','','all',$focus->id);
else
$user_mail_status = send_mail('Emails',$current_user->column_fields['email1'],$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST['ccmail'],$_REQUEST['bccmail'],'all',$focus->id);
Modified: vtigercrm/branches/5.0.3/modules/Emails/webmailsend.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/webmailsend.php (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/webmailsend.php Mon May 14 07:12:27 2007
@@ -9,7 +9,7 @@
********************************************************************************/
require_once("modules/Emails/mail.php");
-$mail_status = send_mail('Emails',$_REQUEST["parent_name"],$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST["ccmail"],$_REQUEST["bccmail"],'all',$focus->id);
+$mail_status = send_mail('Emails',$_REQUEST["parent_name"],$_REQUEST['from_add'],'',$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST["ccmail"],$_REQUEST["bccmail"],'all',$focus->id);
$query = 'update vtiger_emaildetails set email_flag ="SENT" where emailid='.$focus->id;
$adb->query($query);
More information about the vtigercrm-commits
mailing list