Skip to content
Commits on Source (3127)
vendor/*
!vendor/.htaccess
.vscode/*
\ No newline at end of file
......@@ -99,6 +99,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array();
* @since Class available since PHP 4.0.2
* @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear
*/
#[\AllowDynamicProperties]
class PEAR
{
// {{{ properties
......@@ -156,7 +157,7 @@ class PEAR
// }}}
// {{{ constructor
/**
* Constructor. Registers this object in
* $_PEAR_destructor_object_list for destructor emulation if a
......@@ -167,7 +168,7 @@ class PEAR
* @access public
* @return void
*/
function PEAR($error_class = null)
function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
......@@ -191,6 +192,13 @@ class PEAR
}
}
}
function PEAR($error_class = null)
{
// PHP4-style constructor.
// This will NOT be invoked, unless a sub-class that extends `foo` calls it.
// In that case, call the new-style constructor to keep compatibility.
self::__construct($error_class);
}
// }}}
// {{{ destructor
......@@ -227,7 +235,7 @@ class PEAR
* @return mixed A reference to the variable. If not set it will be
* auto initialised to NULL.
*/
function &getStaticProperty($class, $var)
static function &getStaticProperty($class, $var)
{
static $properties;
return $properties[$class][$var];
......@@ -245,7 +253,7 @@ class PEAR
* @param mixed $args The arguments to pass to the function
* @return void
*/
function registerShutdownFunc($func, $args = array())
static function registerShutdownFunc($func, $args = array())
{
$GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
}
......@@ -264,7 +272,7 @@ class PEAR
* @access public
* @return bool true if parameter is an error
*/
function isError($data, $code = null)
static function isError($data, $code = null)
{
if (is_a($data, 'PEAR_Error')) {
if (is_null($code)) {
......@@ -320,7 +328,7 @@ class PEAR
* @since PHP 4.0.5
*/
function setErrorHandling($mode = null, $options = null)
static function setErrorHandling($mode = null, $options = null)
{
if (isset($this) && is_a($this, 'PEAR')) {
$setmode = $this->_default_error_mode;
......@@ -509,7 +517,7 @@ class PEAR
* @see PEAR::setErrorHandling
* @since PHP 4.0.5
*/
function &raiseError($message = null,
static function &raiseError($message = null,
$code = null,
$mode = null,
$options = null,
......@@ -807,6 +815,7 @@ function _PEAR_call_destructors()
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
*/
#[\AllowDynamicProperties]
class PEAR_Error
{
// {{{ properties
......@@ -842,7 +851,7 @@ class PEAR_Error
* @access public
*
*/
function PEAR_Error($message = 'unknown error', $code = null,
function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
......@@ -900,6 +909,15 @@ class PEAR_Error
eval('$e = new Exception($this->message, $this->code);throw($e);');
}
}
function PEAR_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
// PHP4-style constructor.
// This will NOT be invoked, unless a sub-class that extends `foo` calls it.
// In that case, call the new-style constructor to keep compatibility.
self::__construct($message, $code,$mode, $options, $userinfo);
}
// }}}
// {{{ getMode()
......
Vtiger CRM
==========
# Vtiger CRM
Vtiger is a PHP based web application that enables businesses to increase sales wins, marketing ROI, and support satisfaction by providing tools for employees and management work more effectively, capture more data, and derive new actionable insights from across the customer lifecycle.
Get involved
------------
## Get involved
Development on vtiger is done at http://code.vtiger.com
Development on vtiger is done at https://code.vtiger.com
**Note**: Any contributions submitted to Vtiger project should be made available under Vtiger Public License.
If contribution has any patented code, or commercial code, then please communicate with Vtiger team before making the contribution.
https://www.vtiger.com/vtiger-public-license/
To register for an account, please contact info @ vtiger.com, you will need this to file issues and/or fix the code
Once you have an account, you can [browse the code](http://code.vtiger.com/vtiger/vtigercrm/tree/master),
[see if your issue is already reported](http://code.vtiger.com/vtiger/vtigercrm/issues) and if you have a new problem
to report you can [create an issue](http://code.vtiger.com/vtiger/vtigercrm/issues/new?issue)
To register for an account, please contact community @ vtiger.com, you will need this to file issues and/or fix the code
Once you have an account, you can [browse the code](https://code.vtiger.com/vtiger/vtigercrm/tree/master),
[see if your issue is already reported](https://code.vtiger.com/vtiger/vtigercrm/issues) and if you have a new problem
to report you can [create an issue](https://code.vtiger.com/vtiger/vtigercrm/issues/new?issue)
If you then want to fix the issue (or another issue) you can create your own fork of vtiger to work on using the
fork button on the vtiger project, this will create a new git repository for you at
http://code.vtiger.com/yourname/vtigercrm.git
https://code.vtiger.com/yourname/vtigercrm.git
on your computer you will need a git client installed and you need to tell git who you are:
......@@ -30,7 +28,7 @@ on your computer you will need a git client installed and you need to tell git w
now clone your fork of vtiger
git clone http://code.vtiger.com/yourname/vtigercrm.git
git clone https://code.vtiger.com/yourname/vtigercrm.git
this will pull down from the server your copy of the vtiger code and all the history.
......@@ -40,6 +38,8 @@ you will switch to that branch using the checkout command
git branch fix_projects_on_calendar
git checkout fix_projects_on_calendar
Before you install, you need to run ```composer update```
Now you can make your changes and commit all changed files with
git commit -a
......@@ -63,7 +63,6 @@ And you can create additional feature branches from there to fix different thing
If there have been other changes to the central vtiger code that you want in your work area then you can add the central
repository as an upstream remote (only need to do this bit once), then you can fetch changes and merge them
git remote add upstream http://code.vtiger.com/vtiger/vtigercrm.git
git remote add upstream https://code.vtiger.com/vtiger/vtigercrm.git
git fetch upstream
git merge upstream/master
This diff is collapsed.
......@@ -28,7 +28,7 @@ require("config.php");
global $adb;
global $log;
global $HELPDESK_SUPPORT_EMAIL_ID,$HELPDESK_SUPPORT_NAME;
$log =& LoggerManager::getLogger('SendSupportNotification');
$log = Logger::getLogger('SendSupportNotification');
$log->debug(" invoked SendSupportNotification ");
// retrieve the translated strings.
......
{
"name": "vtiger/vtigercrm",
"description": "Vtiger CRM",
"type": "project",
"license": "VPL",
"authors": [
{
"name": "Vtiger",
"email": "[email protected]"
}
],
"autoload": {
"files": ["includes/Loader.php"]
},
"minimum-stability": "stable",
"require": {
"php": ">=8.1",
"ext-mysqli": "*",
"ext-imap": "*",
"ext-curl": "*",
"smarty/smarty": "^4.3",
"dg/rss-php": "^1.5",
"ezyang/htmlpurifier": "^4.16",
"tecnickcom/tcpdf": "^6.6",
"monolog/monolog": "^3.5",
"league/oauth2-client": "^2.7",
"phpmailer/phpmailer": "^6.9",
"league/oauth2-google": "^4.0"
}
}
This diff is collapsed.
......@@ -9,8 +9,8 @@
************************************************************************************/
/* Performance paramters can be configured to fine tune vtiger CRM runtime */
$PERFORMANCE_CONFIG = Array(
// Enable log4php debugging only if requried
'LOG4PHP_DEBUG' => false,
// Enable Vtiger Log Level for debugging only if requried
'LOGLEVEL_DEBUG' => false,
// Should the caller information be captured in SQL Logging?
// It adds little overhead for performance but will be useful to debug
......@@ -20,9 +20,6 @@ $PERFORMANCE_CONFIG = Array(
// This avoids executing the SET NAMES SQL for each query!
'DB_DEFAULT_CHARSET_UTF8' => true,
// Compute record change indication for each record shown on listview
'LISTVIEW_RECORD_CHANGE_INDICATOR' => false,
// Turn-off default sorting in ListView, could eat up time as data grows
'LISTVIEW_DEFAULT_SORTING' => false,
......@@ -38,7 +35,5 @@ $PERFORMANCE_CONFIG = Array(
// reduce number of ajax requests on home page, reduce this value if home page widget dont
// show value.
'HOME_PAGE_WIDGET_GROUP_SIZE' => 12,
//take backup legacy style, whenever an admin user logs out.
'LOGOUT_BACKUP' => true,
);
?>
\ No newline at end of file
?>
......@@ -22,6 +22,11 @@ include('config.inc.php');
$THIS_DIR = dirname(__FILE__);
/* Pre-install overrides */
if (!isset($dbconfig)) {
error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED);
}
if (file_exists($THIS_DIR.'/config_override.php')) {
include_once $THIS_DIR.'/config_override.php';
}
......@@ -30,15 +35,15 @@ class VtigerConfig {
static function get($key, $defvalue='') {
if (self::has($key)) {
global $$key;
return $$key;
global ${$key};
return ${$key};
}
return $defvalue;
}
static function has($key) {
global $$key;
return (isset($$key));
global ${$key};
return (isset(${$key}));
}
static function getOD($key, $defvalue='') {
......
......@@ -28,9 +28,6 @@ ini_set('memory_limit','512M');
// show or hide calendar, world clock, calculator, chat and CKEditor
// Do NOT remove the quotes if you set these to false!
$CALENDAR_DISPLAY = 'true';
$WORLD_CLOCK_DISPLAY = 'true';
$CALCULATOR_DISPLAY = 'true';
$CHAT_DISPLAY = 'true';
$USE_RTE = 'true';
// helpdesk support email id and support name (Example: '[email protected]' and 'vtiger support')
......@@ -114,24 +111,14 @@ $allow_exports = 'all';
// files with one of these extensions will have '.txt' appended to their filename on upload
// upload_badext default value = php, php3, php4, php5, pl, cgi, py, asp, cfm, js, vbs, html, htm
$upload_badext = array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm', 'exe', 'bin', 'bat', 'sh', 'dll', 'phps', 'phtml', 'xhtml', 'rb', 'msi', 'jsp', 'shtml', 'sth', 'shtm');
// full path to include directory including the trailing slash
// includeDirectory default value = $root_directory..'include/
$includeDirectory = $root_directory.'include/';
$upload_badext = array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm', 'exe', 'bin', 'bat', 'sh', 'dll', 'phps', 'phtml', 'xhtml', 'rb', 'msi', 'jsp', 'shtml', 'sth', 'shtm', 'htaccess');
// list_max_entries_per_page default value = 20
$list_max_entries_per_page = '20';
// limitpage_navigation default value = 5
$limitpage_navigation = '5';
// history_max_viewed default value = 5
$history_max_viewed = '5';
// default_module default value = Home
$default_module = 'Home';
// default_action default value = index
$default_action = 'index';
......@@ -139,10 +126,6 @@ $default_action = 'index';
// default_theme default value = blue
$default_theme = 'softed';
// show or hide time to compose each page
// calculate_response_time default value = true
$calculate_response_time = true;
// default text that is placed initially in the login form for user name
// no default_user_name default value
$default_user_name = '';
......@@ -154,12 +137,6 @@ $default_password = '';
// create user with default username and password
// create_default_user default value = false
$create_default_user = false;
// default_user_is_admin default value = false
$default_user_is_admin = false;
// if your MySQL/PHP configuration does not support persistent connections set this to true to avoid a large performance slowdown
// disable_persistent_connections default value = false
$disable_persistent_connections = false;
//Master currency name
$currency_name = '_MASTER_CURRENCY_';
......@@ -172,13 +149,6 @@ $default_charset = '_VT_CHARSET_';
// default_language default value = en_us
$default_language = '_VT_DEFAULT_LANGUAGE_';
// add the language pack name to every translation string in the display.
// translation_string_prefix default value = false
$translation_string_prefix = false;
//Option to cache tabs permissions for speed.
$cache_tab_perms = true;
//Option to hide empty home blocks if no entries.
$display_empty_home_blocks = false;
......@@ -205,5 +175,8 @@ if(isset($default_timezone) && function_exists('date_default_timezone_set')) {
//Set the default layout
$default_layout = 'v7';
//Maximum Listview Fields Selection Size
$maxListFieldsSelectionSize = 15;
include_once 'config.security.php';
?>
<?php
/** Logging configuration for Strict Development */
require_once "vtlib/Vtiger/Utils/PhpLogHandler.php";
Vtiger_PhpLogHandler::enableStrictLogging(__DIR__, "logs/phperr.log");
<?php
/* +**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
* ***********************************************************************************/
//Maximum number of Mailboxes in mail converter
$max_mailboxes = 3;
/**
* Configure runtime connectors to customization in core files.
* Ex: Sessions are currently handled by PHP default session handler.
* This can be customized using runtime connector hook and avoid core file modifications.
* array('session' => 'Vtiger_CustomSession_Handler')
*/
$runtime_connectors = array();
//Password Regex for validation
$validation_regex = array('password_regex' => '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})');
\ No newline at end of file
deny from all
......@@ -22,7 +22,8 @@
//file modified by richie
require_once('include/utils/utils.php');
require_once("modules/Emails/class.phpmailer.php");
//require_once("modules/Emails/class.smtp.php");
//require_once("modules/Emails/class.phpmailer.php");
require_once("modules/Emails/mail.php");
require_once('include/logging.php');
require_once("config.php");
......@@ -41,7 +42,7 @@ if(empty($from)) {
global $adb;
global $log;
global $site_URL;
$log =& LoggerManager::getLogger('SendReminder');
$log =Logger::getLogger('SendReminder');
$log->debug(" invoked SendReminder ");
// retrieve the translated strings.
......@@ -51,14 +52,14 @@ $app_strings = return_application_language($current_language);
//modified query for recurring events -Jag
$query="SELECT vtiger_crmentity.crmid, vtiger_crmentity.description, vtiger_crmentity.smownerid, vtiger_seactivityrel.crmid AS setype,vtiger_activity.*,vtiger_activity_reminder.reminder_time,
vtiger_activity_reminder.reminder_sent,vtiger_activity_reminder.recurringid FROM vtiger_activity
INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_activity.activityid
INNER JOIN vtiger_activity_reminder ON vtiger_activity.activityid=vtiger_activity_reminder.activity_id
LEFT OUTER JOIN vtiger_seactivityrel ON vtiger_seactivityrel.activityid = vtiger_activity.activityid
WHERE DATE_FORMAT(vtiger_activity.date_start,'%Y-%m-%d, %H:%i:%s') >= '".date('Y-m-d')."' AND vtiger_crmentity.crmid != 0 AND
(vtiger_activity.eventstatus is NULL OR vtiger_activity.eventstatus NOT IN ('Held','Cancelled'))
vtiger_activity_reminder.reminder_sent,vtiger_activity_reminder.recurringid FROM vtiger_activity
INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_activity.activityid
INNER JOIN vtiger_activity_reminder ON vtiger_activity.activityid=vtiger_activity_reminder.activity_id
LEFT OUTER JOIN vtiger_seactivityrel ON vtiger_seactivityrel.activityid = vtiger_activity.activityid
WHERE DATE_FORMAT(vtiger_activity.date_start,'%Y-%m-%d, %H:%i:%s') >= '".date('Y-m-d')."' AND vtiger_crmentity.crmid != 0 AND
(vtiger_activity.eventstatus is NULL OR vtiger_activity.eventstatus NOT IN ('Held','Cancelled'))
AND (vtiger_activity.status is NULL OR vtiger_activity.status NOT IN ('Completed', 'Deferred', 'Cancelled'))
AND vtiger_activity_reminder.reminder_sent = 0 AND vtiger_activity_reminder.reminder_time != 0
AND vtiger_activity_reminder.reminder_sent = 0 AND vtiger_activity_reminder.reminder_time != 0
GROUP BY vtiger_activity.activityid";
$result = $adb->pquery($query, array());
......@@ -93,7 +94,7 @@ if($adb->num_rows($result) >= 1)
$activitymode = ($result_set['activitytype'] == "Task")?"Task":"Events";
$parent_type = $result_set['setype'];
$activity_sub = $result_set['subject'];
$to_addr='';
$to_addr= array();
if($parent_type!='')
$parent_content = getParentInfo($parent_type)."\n";
......@@ -170,7 +171,7 @@ if($adb->num_rows($result) >= 1)
$result_set['subject'] = decode_html($result_set['subject']);
if($result_set['activitytype'] == "Task") {
$enddateInOwnerFormat = $enddateTime->getDisplayDate($ownerFocus);
$list = $todoReminderBody;
$list = $todoReminderBody;
$list = str_replace('$calendar-subject$',$result_set['subject'],$list);
$list = str_replace('$calendar-description$',$result_set['description'],$list);
$list = str_replace('$calendar-date_start$', $dateTimeInOwnerFormat.' '.$ownerTimeZone, $list);
......@@ -193,11 +194,11 @@ if($adb->num_rows($result) >= 1)
$recordModel = Vtiger_Record_Model::getInstanceById($activity_id, 'Calendar');
$recordDetailViewLink = $recordModel->getDetailViewUrl();
$contents = $contents."<br/> ".vtranslate('LBL_CLICK_HERE_TO_VIEW', 'Calendar')."&nbsp;<a href=$site_URL/$recordDetailViewLink>".vtranslate('LBL_RECORD', 'Calendar')."</a>";
if(count($to_addr) >=1)
if(php7_count($to_addr) >=1)
{
send_email($to_addr,$from,$subject,$contents,$mail_server,$mail_server_username,$mail_server_password);
$upd_query = "UPDATE vtiger_activity_reminder SET reminder_sent = ?";
$upd_params = array(1);
$upd_query = "UPDATE vtiger_activity_reminder SET reminder_sent = ? WHERE activity_id = ?";
$upd_params = array('1',$activity_id);
if($recur_id!=0)
{
......@@ -231,7 +232,7 @@ function send_email($to,$from,$subject,$contents,$mail_server,$mail_server_usern
$log->info("This is send_mail function in SendReminder.php(vtiger home).");
global $root_directory;
$mail = new PHPMailer();
$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->Subject = $subject;
......@@ -253,7 +254,7 @@ function send_email($to,$from,$subject,$contents,$mail_server,$mail_server_usern
else
$mail->SMTPAuth = false;
$mail->Username = $mail_server_username ; // SMTP username
$mail->Password = $mail_server_password ; // SMTP password
$mail->Password = Vtiger_Functions::fromProtectedText($mail_server_password) ; // SMTP password
$mail->From = $from;
$mail->FromName = $initialfrom;
$log->info("Mail sending process : From Name & email id => '".$initialfrom."','".$from."'");
......
This diff is collapsed.
This diff is collapsed.
......@@ -22,7 +22,7 @@ $mailserveresult = $adb->pquery("SELECT server,server_username,server_password,s
$mailrow = $adb->fetch_array($mailserveresult);
$mailserver = $mailrow[0];
$mailuname = $mailrow[1];
$mailpwd = $mailrow[2];
$mailpwd = Vtiger_Functions::fromProtectedText($mailrow[2]);
$smtp_auth = $mailrow[3];
// End Email Setup
......@@ -39,7 +39,7 @@ if($activevalue[0] == 1)
//get all those activities where the status is not completed even after the passing of 24 hours
$today = date("Ymd");
$result = $adb->pquery("select vtiger_activity.status,vtiger_activity.activityid,subject,(vtiger_activity.date_start +1),vtiger_crmentity.smownerid from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid where vtiger_crmentity.deleted=0 and vtiger_activity.status <> 'Completed' and activitytype='Task' and ".$today." > (vtiger_activity.date_start+1)", array());
$result = $adb->pquery("select vtiger_activity.status,vtiger_activity.activityid,subject,(vtiger_activity.date_start +1),vtiger_crmentity.smownerid from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid where vtiger_crmentity.deleted=0 and vtiger_activity.status <> 'Completed' and activitytype='Task' and ? > (vtiger_activity.date_start+1)", array($today));
while ($myrow = $adb->fetch_array($result))
{
......
<?php
/*+***********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*************************************************************************************/
$mod_strings=Array(
'EmailTemplates' => 'Email Templates',
)
?>
\ No newline at end of file
<?php
/*+***********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*************************************************************************************/
require_once 'modules/Oauth2/handlers/TokenRefresher.php';
$tokenRefresher = new Oauth2_TokenRefresher_Handler();
$tokenRefresher->refreshAll();
\ No newline at end of file
......@@ -12,7 +12,7 @@ require_once('include/utils/utils.php');
require_once('include/logging.php');
global $adb, $log;
$log =& LoggerManager::getLogger('RecurringInvoice');
$log = Logger::getLogger('RecurringInvoice');
$log->debug("invoked RecurringInvoice");
$currentDate = date('Y-m-d');
......@@ -22,8 +22,8 @@ $sql="SELECT vtiger_salesorder.salesorderid, recurring_frequency, start_period,
payment_duration, invoice_status FROM vtiger_salesorder
INNER JOIN vtiger_crmentity ON vtiger_salesorder.salesorderid = vtiger_crmentity.crmid AND vtiger_crmentity.deleted = 0
INNER JOIN vtiger_invoice_recurring_info ON vtiger_salesorder.salesorderid = vtiger_invoice_recurring_info.salesorderid
WHERE DATE_FORMAT(start_period,'%Y-%m-%d') <= '$currentDate' AND DATE_FORMAT(end_period,'%Y-%m-%d') >= '$currentDate'";
$result = $adb->pquery($sql, array());
WHERE DATE_FORMAT(start_period,'%Y-%m-%d') <= ? AND DATE_FORMAT(end_period,'%Y-%m-%d') >= ?";
$result = $adb->pquery($sql, array($currentDate, $currentDate));
$no_of_salesorder = $adb->num_rows($result);
for($i=0; $i<$no_of_salesorder;$i++) {
......@@ -141,7 +141,11 @@ function createInvoice($salesorder_id, $recurringDate = false) {
}
$focus->_salesorderid = $salesorder_id;
$focus->_recurring_mode = 'recurringinvoice_from_so';
$focus->save("Invoice");
try {
$focus->save("Invoice");
} catch (Exception $e) {
//TODO - Review
}
}
function getRecurringDate($recurringDate, $recurringFrequency) {
......@@ -155,6 +159,7 @@ function getRecurringDate($recurringDate, $recurringFrequency) {
case 'monthly' : $m = $m + 1; break;
case 'quarterly' : $m = $m + 3; break;
case 'every 4 months': $m = $m + 4; break;
case 'half-yearly' : $m = $m + 6; break;
case 'yearly' : $y = $y + 1; break;
......@@ -181,4 +186,3 @@ function getRecurringDate($recurringDate, $recurringFrequency) {
return array('validDate' => $validNextRecurringDate, 'nextRecurringDate' => $nextRecurringDate);
}
?>
......@@ -22,13 +22,13 @@
//file modified by richie
require("class.smtp.php");
require("class.phpmailer.php");
// require_once("modules/Emails/class.smtp.php");
// require_once("modules/Emails/class.phpmailer.php");
require_once 'include/utils/CommonUtils.php';
function sendmail($to,$from,$subject,$contents,$mail_server,$mail_server_username,$mail_server_password,$filename,$smtp_auth='')
{
$mail = new PHPMailer();
$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->Subject = $subject;
$mail->Body = $contents;//"This is the HTML message body <b>in bold!</b>";
......@@ -42,17 +42,17 @@ function sendmail($to,$from,$subject,$contents,$mail_server,$mail_server_usernam
else
$mail->SMTPAuth = false;
$mail->Username = $mail_server_username ;//$smtp_username; // SMTP username
$mail->Password = $mail_server_password ;//$smtp_password; // SMTP password
$mail->Password = Vtiger_Functions::fromProtectedText($mail_server_password);//$smtp_password; // SMTP password
$mail->From = $from;
$mail->FromName = $initialfrom;
$mail->AddAddress($to); // name is optional
$mail->AddReplyTo($from);
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
// $mail->Sender= getReturnPath($mail->Host);
if(!$mail->Send())
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
......