From a4809ff0f1f0fe6ad0e0a8317f30cea78cbd306a Mon Sep 17 00:00:00 2001 From: Xenomporio <> Date: Sun, 3 Jul 2022 16:41:37 +0200 Subject: [PATCH] Removed old phpmailer from all cronjobs --- cronjobs/amazon.php | 42 -------------------- cronjobs/api_uebertragungen.php | 50 ------------------------ cronjobs/artikel_zusammenfassen.php | 2 - cronjobs/artikelcache.php | 38 ------------------ cronjobs/artikeluebertragen.php | 2 - cronjobs/aufgabenmails.php | 49 ----------------------- cronjobs/autoversand_berechnung.php | 3 -- cronjobs/bestellungabschliessen.php | 32 --------------- cronjobs/cache.php | 3 -- cronjobs/cleaner.php | 2 - cronjobs/coface_import.php | 2 - cronjobs/command.php | 30 -------------- cronjobs/convert_kontoblz_iban.php | 1 - cronjobs/etiketten.php | 3 -- cronjobs/event_api.php | 26 ------------ cronjobs/exportmail.php | 32 +-------------- cronjobs/folgebestaetigung.php | 28 ------------- cronjobs/forceupdate_lagerzahlen.php | 29 -------------- cronjobs/getarticles.php | 4 -- cronjobs/importvorlage.php | 49 ----------------------- cronjobs/kalender.php | 46 ---------------------- cronjobs/lagerwert.php | 4 -- cronjobs/lagerzahlen.php | 34 +--------------- cronjobs/lagerzahlen_alle.php | 4 -- cronjobs/mlm.php | 2 - cronjobs/onlineshops_tasks.php | 4 +- cronjobs/openstreetmap.php | 4 -- cronjobs/partner_shop.php | 2 - cronjobs/pdfarchiv.php | 2 - cronjobs/pdfarchiv_app.php | 6 --- cronjobs/pdfarchiv_move.php | 6 --- cronjobs/pdfmirror.php | 2 - cronjobs/produktion_berechnen.php | 2 - cronjobs/shop_rueckmeldungen.php | 45 --------------------- cronjobs/shopexport.php | 28 ------------- cronjobs/shopexport_adressexport.php | 8 ---- cronjobs/shopexport_voucher.php | 2 - cronjobs/shopimport.php | 45 --------------------- cronjobs/shopimport_auftragarchiv.php | 8 ---- cronjobs/shopimport_checkorder.php | 2 - cronjobs/shopimporter_gruppenexport.php | 8 ---- cronjobs/starter.php | 2 - cronjobs/starter2.php | 2 - cronjobs/test.php | 4 -- cronjobs/versandmailsundrueckmeldung.php | 38 ------------------ cronjobs/vertriebscockpit.php | 37 ------------------ cronjobs/zahlungsmail.php | 45 --------------------- 47 files changed, 3 insertions(+), 816 deletions(-) diff --git a/cronjobs/amazon.php b/cronjobs/amazon.php index 8da37c3a..3a0faac0 100644 --- a/cronjobs/amazon.php +++ b/cronjobs/amazon.php @@ -18,8 +18,6 @@ if(!class_exists('AES')){ include_once(dirname(__DIR__) . "/www/lib/class.aes.php"); } include_once(dirname(__DIR__)."/www/pages/shopimport.php"); -include_once(dirname(__DIR__)."/www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__DIR__)."/www/plugins/phpmailer/class.smtp.php"); if(!class_exists('Secure')){ include_once(dirname(__DIR__) . "/phpwf/plugins/class.secure.php"); } @@ -139,46 +137,6 @@ $app->Secure = new Secure($app); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->erp->Firmendaten('benutzername'); -$passwort = $app->erp->Firmendaten('passwort'); -$host = $app->erp->Firmendaten('host'); -$port = $app->erp->Firmendaten('port'); -$mailssl = $app->erp->Firmendaten('mailssl'); -$mailanstellesmtp = $app->erp->Firmendaten('mailanstellesmtp'); -$noauth = $app->erp->Firmendaten('noauth'); - - -// mail -$app->mail = new PHPMailer($app); -$app->mail->CharSet = 'UTF-8'; -$app->mail->PluginDir='plugins/phpmailer/'; - -if($mailanstellesmtp=='1'){ - $app->mail->IsMail(); -} else { - $app->mail->IsSMTP(); - - if($noauth=='1') { - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = 'tls'; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = 'ssl'; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password -} $cronjob = $app->DB->Select("SELECT id FROM prozessstarter WHERE aktiv = 1 AND parameter = 'amazon' LIMIT 1"); if(!$cronjob) { diff --git a/cronjobs/api_uebertragungen.php b/cronjobs/api_uebertragungen.php index 5befc6c3..0bdd8171 100644 --- a/cronjobs/api_uebertragungen.php +++ b/cronjobs/api_uebertragungen.php @@ -49,9 +49,6 @@ if(!class_exists('AES')){ include_once(dirname(__DIR__) . '/www/lib/class.aes.php'); } } -include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'); -include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'); - $classes = array('briefpapier','lieferschein','auftrag','anfrage','gutschrift','bestellung','rechnung', 'mahnwesen'); foreach($classes as $class) @@ -85,12 +82,6 @@ include_once(__DIR__."/../www/lib/ShopimporterBase.php"); if(!class_exists('WawiString')){ include_once(dirname(__DIR__) . '/phpwf/plugins/class.string.php'); } -if(!class_exists('SMTP')){ - require_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'); -} -if(!class_exists('PHPMailer')){ - require_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'); -} if(!class_exists('app_t2')) { class app_t2 extends ApplicationCore { @@ -402,47 +393,6 @@ if(!class_exists('app_t2')) //ENDE - - $benutzername = $app->erp->Firmendaten("benutzername"); - $passwort = $app->erp->Firmendaten("passwort"); - $host = $app->erp->Firmendaten("host"); - $port = $app->erp->Firmendaten("port"); - $mailssl = $app->erp->Firmendaten("mailssl"); - $noauth = $app->erp->Firmendaten("noauth"); - $mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = "UTF-8"; - $app->mail->PluginDir=dirname(__DIR__).'/www/plugins/phpmailer/'; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1"){ - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - } - elseif ($mailssl==2){ - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->FormHandler = new FormHandler($app); if(!$app->erp->ModulVorhanden('uebertragungen')) { diff --git a/cronjobs/artikel_zusammenfassen.php b/cronjobs/artikel_zusammenfassen.php index 86f29f71..90d5ef8e 100644 --- a/cronjobs/artikel_zusammenfassen.php +++ b/cronjobs/artikel_zusammenfassen.php @@ -14,8 +14,6 @@ if(!class_exists('AES')){ include_once dirname(__DIR__) . "/www/lib/class.aes.php"; } } -include_once dirname(__DIR__)."/www/plugins/phpmailer/class.phpmailer.php"; -include_once dirname(__DIR__)."/www/plugins/phpmailer/class.smtp.php"; if(!class_exists('app_t')){ class app_t { diff --git a/cronjobs/artikelcache.php b/cronjobs/artikelcache.php index d597beb1..d9f009bc 100644 --- a/cronjobs/artikelcache.php +++ b/cronjobs/artikelcache.php @@ -61,12 +61,6 @@ if(!class_exists('AES')){ if(!class_exists('Printer')){ include_once(dirname(__DIR__) . '/www/lib/class.printer.php'); } -if(!class_exists('PHPMailer')){ - include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'); -} -if(!class_exists('SMTP')){ - include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'); -} $classes = array('briefpapier','lieferschein','auftrag','anfrage','gutschrift','bestellung','rechnung','mahnwesen'); foreach($classes as $class) { @@ -407,38 +401,6 @@ if(empty($app->erp)) { //ENDE - $benutzername = $app->erp->Firmendaten("benutzername"); - $passwort = $app->erp->Firmendaten("passwort"); - $host = $app->erp->Firmendaten("host"); - $port = $app->erp->Firmendaten("port"); - $mailssl = $app->erp->Firmendaten("mailssl"); - $mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = "UTF-8"; - $app->mail->PluginDir="plugins/phpmailer/"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - $app->mail->SMTPAuth = true; // enable SMTP authentication - if($mailssl==1){ - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->FormHandler = new FormHandler($app); $app->printer = new Printer($app); diff --git a/cronjobs/artikeluebertragen.php b/cronjobs/artikeluebertragen.php index 705a5331..88e7391f 100644 --- a/cronjobs/artikeluebertragen.php +++ b/cronjobs/artikeluebertragen.php @@ -8,8 +8,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi_custom.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); diff --git a/cronjobs/aufgabenmails.php b/cronjobs/aufgabenmails.php index b3956ee7..e5e2172f 100644 --- a/cronjobs/aufgabenmails.php +++ b/cronjobs/aufgabenmails.php @@ -4,11 +4,6 @@ include(dirname(__FILE__)."/../conf/main.conf.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.db.php"); include(dirname(__FILE__)."/../www/lib/imap.inc.php"); include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - - class app_t { var $DB; @@ -21,50 +16,6 @@ class app_t { $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); -$noauth = $app->erp->Firmendaten("noauth"); - - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = "UTF-8"; - //$app->mail->PluginDir="plugins/phpmailer/"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1") - { - $app->mail->SMTPAuth = false; - } - else - { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - - //$app->erp->LogFile("start aufgabe"); $app->DB->Update("UPDATE aufgabe SET email_gesendet_vorankuendigung=0 WHERE DATE_SUB(abgabe_bis, INTERVAL vorankuendigung DAY) = DATE_FORMAT(NOW(),'%Y-%m-%d') AND vorankuendigung > 0 AND DATE_FORMAT(NOW(),'%H:%i') < DATE_FORMAT(abgabe_bis_zeit,'%H:%i')"); diff --git a/cronjobs/autoversand_berechnung.php b/cronjobs/autoversand_berechnung.php index 1cca8443..844b3f29 100644 --- a/cronjobs/autoversand_berechnung.php +++ b/cronjobs/autoversand_berechnung.php @@ -10,9 +10,6 @@ if(file_exists(dirname(__DIR__).'/www/lib/class.erpapi_custom.php') && include_once dirname(__DIR__) . '/www/lib/class.erpapi_custom.php'; } -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; - if(!class_exists('app_t')){ class app_t extends ApplicationCore { diff --git a/cronjobs/bestellungabschliessen.php b/cronjobs/bestellungabschliessen.php index 28782f21..6276975c 100644 --- a/cronjobs/bestellungabschliessen.php +++ b/cronjobs/bestellungabschliessen.php @@ -24,38 +24,6 @@ $app->erp = $erp; $remote = new Remote($app); $app->remote = $remote; -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); -$noauth = $app->erp->Firmendaten("noauth"); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1") $app->mail->SMTPAuth = false; - else $app->mail->SMTPAuth = true; - - if($mailssl==1) - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - else if ($mailssl==2) - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->DB->Update("UPDATE prozessstarter SET mutexcounter = mutexcounter + 1 WHERE mutex = 1 AND parameter = 'bestellungabschliessen' AND aktiv = 1"); if(!$app->erp->Firmendaten('bestellungabschliessen') || !$app->DB->Select("SELECT id FROM prozessstarter WHERE mutex = 0 AND parameter = 'bestellungabschliessen' AND aktiv = 1")){ return; diff --git a/cronjobs/cache.php b/cronjobs/cache.php index e0a355cd..30f7ec79 100644 --- a/cronjobs/cache.php +++ b/cronjobs/cache.php @@ -9,9 +9,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - class app_t { var $DB; diff --git a/cronjobs/cleaner.php b/cronjobs/cleaner.php index 796a506d..4c0759e0 100644 --- a/cronjobs/cleaner.php +++ b/cronjobs/cleaner.php @@ -25,8 +25,6 @@ if(!class_exists('AES')){ } } include_once dirname(__DIR__).'/www/pages/shopimport.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; include_once dirname(__DIR__).'/phpwf/plugins/class.secure.php'; if(!class_exists('app_t')) diff --git a/cronjobs/coface_import.php b/cronjobs/coface_import.php index b79c9397..90b6fda6 100644 --- a/cronjobs/coface_import.php +++ b/cronjobs/coface_import.php @@ -22,8 +22,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); include_once(dirname(__FILE__)."/../www/lib/class.remote.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); //include_once(dirname(__FILE__)."/coface_log.php"); //include_once(dirname(__FILE__)."/coface_io.php"); diff --git a/cronjobs/command.php b/cronjobs/command.php index c9899078..9ef70de9 100644 --- a/cronjobs/command.php +++ b/cronjobs/command.php @@ -75,36 +75,6 @@ if (method_exists($app->erp, 'CheckCronjob') && !$app->erp->CheckCronjob()) { } $firmendatenid = $app->DB->Select('SELECT MAX(id) FROM firmendaten LIMIT 1'); -$benutzername = $app->DB->Select("SELECT benutzername FROM firmendaten WHERE id='" . $firmendatenid . "' LIMIT 1"); -$passwort = $app->DB->Select("SELECT passwort FROM firmendaten WHERE id='" . $firmendatenid . "' LIMIT 1"); -$host = $app->DB->Select("SELECT host FROM firmendaten WHERE id='" . $firmendatenid . "' LIMIT 1"); -$port = $app->DB->Select("SELECT port FROM firmendaten WHERE id='" . $firmendatenid . "' LIMIT 1"); -$mailssl = $app->DB->Select("SELECT mailssl FROM firmendaten WHERE id='" . $firmendatenid . "' LIMIT 1"); -$noauth = $app->erp->Firmendaten('noauth'); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = 'UTF-8'; -//$app->mail->PluginDir="plugins/phpmailer/"; -$app->mail->IsSMTP(); - -if ($noauth == '1') { - $app->mail->SMTPAuth = false; -} else { - $app->mail->SMTPAuth = true; -} -if($mailssl == 1){ - $app->mail->SMTPSecure = 'tls'; -}else if($mailssl == 2){ - $app->mail->SMTPSecure = 'ssl'; -} - -$app->mail->Host = $host; -$app->mail->Port = $port; // set the SMTP port for the GMAIL server - -$app->mail->Username = $benutzername; -$app->mail->Password = $passwort; - - $app->erp->SetKonfigurationValue('prozessstarter_letzteraufruf', date('Y-m-d H:i:s')); /** @var \Xentral\Modules\SystemHealth\Service\SystemHealthService $service */ diff --git a/cronjobs/convert_kontoblz_iban.php b/cronjobs/convert_kontoblz_iban.php index d663b769..e4cdf3b7 100644 --- a/cronjobs/convert_kontoblz_iban.php +++ b/cronjobs/convert_kontoblz_iban.php @@ -3,7 +3,6 @@ include(dirname(__FILE__)."/../conf/main.conf.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.mysql.php"); include(dirname(__FILE__)."/../www/lib/imap.inc.php"); include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); class app_t { var $DB; diff --git a/cronjobs/etiketten.php b/cronjobs/etiketten.php index 7e8c4dae..e1033a0d 100644 --- a/cronjobs/etiketten.php +++ b/cronjobs/etiketten.php @@ -44,9 +44,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); include_once(dirname(__FILE__)."/../www/lib/class.printer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - include_once(dirname(__FILE__)."/../www/lib/dokumente/class.superfpdf.php"); include_once(dirname(__FILE__)."/../www/lib/dokumente/class.etiketten.php"); diff --git a/cronjobs/event_api.php b/cronjobs/event_api.php index 8c9eb55a..74ae9c1a 100644 --- a/cronjobs/event_api.php +++ b/cronjobs/event_api.php @@ -13,9 +13,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) include_once(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php"); }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - if(!class_exists('app_t')) { @@ -41,29 +38,6 @@ $app->erp = $erp; $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->DB->Select("SELECT benutzername FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$passwort = $app->DB->Select("SELECT passwort FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$host = $app->DB->Select("SELECT host FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$port = $app->DB->Select("SELECT port FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$mailssl = $app->DB->Select("SELECT mailssl FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$noauth = $app->erp->Firmendaten("noauth"); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; -//$app->mail->PluginDir="plugins/phpmailer/"; -$app->mail->IsSMTP(); - -if($noauth=="1") $app->mail->SMTPAuth = false; -else $app->mail->SMTPAuth = true; - -if($mailssl) -$app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier -$app->mail->Host = $host; -$app->mail->Port = $port; // set the SMTP port for the GMAIL server - -$app->mail->Username = $benutzername; -$app->mail->Password = $passwort; - $events = $app->DB->SelectArr("SELECT * FROM event_api"); for($ij=0;$ijDB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->DB->Select("SELECT benutzername FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$passwort = $app->DB->Select("SELECT passwort FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$host = $app->DB->Select("SELECT host FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$port = $app->DB->Select("SELECT port FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$mailssl = $app->DB->Select("SELECT mailssl FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$noauth = $app->erp->Firmendaten("noauth"); - - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; -//$app->mail->PluginDir="plugins/phpmailer/"; -$app->mail->IsSMTP(); - -if($noauth=="1") $app->mail->SMTPAuth = false; -else $app->mail->SMTPAuth = true; - -if($mailssl) -$app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier -$app->mail->Host = $host; -$app->mail->Port = $port; // set the SMTP port for the GMAIL server - -$app->mail->Username = $benutzername; -$app->mail->Password = $passwort; - - - - $erp->ExportlinkZahlungsmail(); +$erp->ExportlinkZahlungsmail(); ?> diff --git a/cronjobs/folgebestaetigung.php b/cronjobs/folgebestaetigung.php index c8174fad..910e4896 100644 --- a/cronjobs/folgebestaetigung.php +++ b/cronjobs/folgebestaetigung.php @@ -13,8 +13,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); class app_t { var $DB; @@ -39,32 +37,6 @@ $app->erp->LogFile("Folgebestaetigung gestartet"); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->DB->Select("SELECT benutzername FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$passwort = $app->DB->Select("SELECT passwort FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$host = $app->DB->Select("SELECT host FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$port = $app->DB->Select("SELECT port FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$mailssl = $app->DB->Select("SELECT mailssl FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$noauth = $app->DB->Select("SELECT noauth FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); - - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; -//$app->mail->PluginDir="plugins/phpmailer/"; -$app->mail->IsSMTP(); - -if($noauth=="1") $app->mail->SMTPAuth = false; -else $app->mail->SMTPAuth = true; - - -//if($mailssl) -//$app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier -$app->mail->Host = $host; -$app->mail->Port = $port; // set the SMTP port for the GMAIL server - -$app->mail->Username = $benutzername; -$app->mail->Password = $passwort; - - $app->Secure = new Secure($app); $app->User = new User($app); $app->erp->LogFile("Folgebestaetigung start AuftraegeBerechnen"); diff --git a/cronjobs/forceupdate_lagerzahlen.php b/cronjobs/forceupdate_lagerzahlen.php index 564443c3..5e84fe71 100644 --- a/cronjobs/forceupdate_lagerzahlen.php +++ b/cronjobs/forceupdate_lagerzahlen.php @@ -14,10 +14,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) include_once(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php"); }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; @@ -38,31 +34,6 @@ $remote = new Remote($app); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->DB->Select("SELECT benutzername FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$passwort = $app->DB->Select("SELECT passwort FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$host = $app->DB->Select("SELECT host FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$port = $app->DB->Select("SELECT port FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$mailssl = $app->DB->Select("SELECT mailssl FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$noauth = $app->erp->Firmendaten("noauth"); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; -//$app->mail->PluginDir="plugins/phpmailer/"; -$app->mail->IsSMTP(); - -if($noauth=="1") $app->mail->SMTPAuth = false; -else $app->mail->SMTPAuth = true; - - -if($mailssl) -$app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier -$app->mail->Host = $host; -$app->mail->Port = $port; // set the SMTP port for the GMAIL server - -$app->mail->Username = $benutzername; -$app->mail->Password = $passwort; - - $lagerartikel = $app->DB->SelectArr("SELECT id,name_de,lieferzeit FROM artikel WHERE shop > 0"); echo "count ".count($lagerartikel); diff --git a/cronjobs/getarticles.php b/cronjobs/getarticles.php index 7a559b48..7b4464cd 100644 --- a/cronjobs/getarticles.php +++ b/cronjobs/getarticles.php @@ -8,10 +8,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi_custom.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; diff --git a/cronjobs/importvorlage.php b/cronjobs/importvorlage.php index a5c22275..67f81121 100644 --- a/cronjobs/importvorlage.php +++ b/cronjobs/importvorlage.php @@ -49,8 +49,6 @@ if(!class_exists('AES')){ include_once(dirname(__DIR__) . '/www/lib/class.aes.php'); } } -include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'); -include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'); $classes = array('briefpapier','lieferschein','auftrag','anfrage','gutschrift','bestellung','rechnung', 'mahnwesen'); @@ -85,12 +83,6 @@ include_once(__DIR__."/../www/lib/ShopimporterBase.php"); if(!class_exists('WawiString')){ include_once(dirname(__DIR__) . '/phpwf/plugins/class.string.php'); } -if(!class_exists('SMTP')){ - require_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'); -} -if(!class_exists('PHPMailer')){ - require_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'); -} if(!class_exists('app_t2')) { class app_t2 extends ApplicationCore { @@ -402,47 +394,6 @@ if(!defined('FPDF_FONTPATH')) //ENDE - -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$noauth = $app->erp->Firmendaten("noauth"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); - -// mail -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; -$app->mail->PluginDir=dirname(__DIR__).'/www/plugins/phpmailer/'; - -if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); -} else { - $app->mail->IsSMTP(); - - if($noauth=="1"){ - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - } - elseif ($mailssl==2){ - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password -} - $app->FormHandler = new FormHandler($app); $app->DB->Update("UPDATE prozessstarter SET mutexcounter = mutexcounter + 1 WHERE mutex = 1 AND (parameter = 'importvorlage') AND aktiv = 1"); diff --git a/cronjobs/kalender.php b/cronjobs/kalender.php index 10387eb6..f44731dc 100644 --- a/cronjobs/kalender.php +++ b/cronjobs/kalender.php @@ -4,10 +4,6 @@ include(dirname(__FILE__)."/../conf/main.conf.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.mysql.php"); include(dirname(__FILE__)."/../www/lib/imap.inc.php"); include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; @@ -43,51 +39,9 @@ if(empty($app->erp)){ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); -$noauth = $app->erp->Firmendaten("noauth"); - - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = 'UTF-8'; - $app->mail->PluginDir='plugins/phpmailer/'; - - if($mailanstellesmtp=='1'){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=='1') { - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = 'tls'; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = 'ssl'; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->DB->Update("UPDATE prozessstarter SET mutexcounter = mutexcounter + 1 WHERE mutex = 1 AND (parameter = 'kalender' ) AND aktiv = 1"); if(!$app->DB->Select("SELECT id FROM prozessstarter WHERE mutex = 0 AND (parameter = 'kalender') AND aktiv = 1"))return; - // alle termine innerhalb der nächsten 15 Minuten $termine = $app->DB->SelectArr("SELECT ke.id,ke.bezeichnung,DATE_FORMAT(ke.von,'%H:%i') as start,ke.beschreibung,ke.allDay FROM kalender_event AS ke diff --git a/cronjobs/lagerwert.php b/cronjobs/lagerwert.php index e6c7a12e..1e8b0c0c 100644 --- a/cronjobs/lagerwert.php +++ b/cronjobs/lagerwert.php @@ -7,10 +7,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; diff --git a/cronjobs/lagerzahlen.php b/cronjobs/lagerzahlen.php index 548e463b..59ee513a 100644 --- a/cronjobs/lagerzahlen.php +++ b/cronjobs/lagerzahlen.php @@ -40,39 +40,6 @@ $app->erp->LogFile("Starte Synchronisation"); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); - -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); -$noauth = $app->erp->Firmendaten("noauth"); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1") $app->mail->SMTPAuth = false; - else $app->mail->SMTPAuth = true; - - if($mailssl==1) - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - else if ($mailssl==2) - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->DB->Update( "UPDATE `prozessstarter` SET `mutexcounter` = `mutexcounter` + 1 @@ -190,6 +157,7 @@ $app->mail->CharSet = "UTF-8"; 'Systemmeldung: Auto Update Lagerlampen', $message ); + }else{ if($erp->GetFirmaBCC1() != ''){ $erp->MailSend( diff --git a/cronjobs/lagerzahlen_alle.php b/cronjobs/lagerzahlen_alle.php index 2c7ee8c7..04da5f34 100644 --- a/cronjobs/lagerzahlen_alle.php +++ b/cronjobs/lagerzahlen_alle.php @@ -8,10 +8,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi_custom.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; diff --git a/cronjobs/mlm.php b/cronjobs/mlm.php index 2c56c7e5..e83e7b9b 100644 --- a/cronjobs/mlm.php +++ b/cronjobs/mlm.php @@ -13,8 +13,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); class app_t { var $DB; diff --git a/cronjobs/onlineshops_tasks.php b/cronjobs/onlineshops_tasks.php index 06c9eddf..e4e4fd8e 100644 --- a/cronjobs/onlineshops_tasks.php +++ b/cronjobs/onlineshops_tasks.php @@ -10,8 +10,6 @@ include_once dirname(__DIR__).'/www/lib/class.erpapi.php'; include_once dirname(__DIR__).'/www/lib/class.remote.php'; include_once dirname(__DIR__).'/www/lib/class.httpclient.php'; include_once dirname(__DIR__).'/www/lib/class.aes.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; include_once dirname(__DIR__).'/www/lib/ShopimporterBase.php'; $app = new ApplicationCore(); @@ -151,4 +149,4 @@ $app->DB->Update( "UPDATE `prozessstarter` SET `letzteausfuerhung`=NOW(), `mutex` = 0,`mutexcounter`=0 WHERE `parameter` = 'onlineshops_tasks'" -); \ No newline at end of file +); diff --git a/cronjobs/openstreetmap.php b/cronjobs/openstreetmap.php index 1317865d..0772233a 100644 --- a/cronjobs/openstreetmap.php +++ b/cronjobs/openstreetmap.php @@ -7,10 +7,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; diff --git a/cronjobs/partner_shop.php b/cronjobs/partner_shop.php index 9309edd3..90371639 100644 --- a/cronjobs/partner_shop.php +++ b/cronjobs/partner_shop.php @@ -8,8 +8,6 @@ if(file_exists(dirname(__FILE__)."/../www/lib/class.erpapi_custom.php"))include_ include_once(dirname(__FILE__)."/../www/lib/class.remote.php"); include_once(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); */ if(!class_exists('app_t')) diff --git a/cronjobs/pdfarchiv.php b/cronjobs/pdfarchiv.php index 98181cbb..9abada08 100644 --- a/cronjobs/pdfarchiv.php +++ b/cronjobs/pdfarchiv.php @@ -42,8 +42,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) include_once(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php"); }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); $classes = array('briefpapier','lieferschein','auftrag','anfrage','gutschrift','bestellung','rechnung','mahnwesen'); foreach($classes as $class) diff --git a/cronjobs/pdfarchiv_app.php b/cronjobs/pdfarchiv_app.php index 9adfc9b6..278ef8a7 100644 --- a/cronjobs/pdfarchiv_app.php +++ b/cronjobs/pdfarchiv_app.php @@ -73,12 +73,6 @@ if(!class_exists('AES')){ include_once(dirname(__DIR__) . "/www/lib/class.aes.php"); } -if(!class_exists('PHPMailer')){ - include_once(dirname(__DIR__) . "/www/plugins/phpmailer/class.phpmailer.php"); -} -if(!class_exists('SMTP')){ - include_once(dirname(__DIR__) . "/www/plugins/phpmailer/class.smtp.php"); -} if(!class_exists('image')) { include_once (dirname(__DIR__)."/www/lib/class.image.php"); diff --git a/cronjobs/pdfarchiv_move.php b/cronjobs/pdfarchiv_move.php index 062b03a9..f32de6a7 100644 --- a/cronjobs/pdfarchiv_move.php +++ b/cronjobs/pdfarchiv_move.php @@ -73,12 +73,6 @@ if(!class_exists('AES')){ } } -if(!class_exists('PHPMailer')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'; -} -if(!class_exists('SMTP')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'; -} if(!class_exists('image')) { include_once dirname(__DIR__).'/www/lib/class.image.php'; diff --git a/cronjobs/pdfmirror.php b/cronjobs/pdfmirror.php index fae282e6..5bdec991 100644 --- a/cronjobs/pdfmirror.php +++ b/cronjobs/pdfmirror.php @@ -20,8 +20,6 @@ if($aes == 2 && is_file(dirname(__DIR__)."/www/lib/class.aes".$aes.".php")) include_once(dirname(__DIR__)."/www/lib/class.aes".$aes.".php"); }else include_once(dirname(__DIR__)."/www/lib/class.aes.php"); -include_once(dirname(__DIR__)."/www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__DIR__)."/www/plugins/phpmailer/class.smtp.php"); if(!class_exists('app_t')){ class app_t diff --git a/cronjobs/produktion_berechnen.php b/cronjobs/produktion_berechnen.php index d792a37c..fc1b6995 100644 --- a/cronjobs/produktion_berechnen.php +++ b/cronjobs/produktion_berechnen.php @@ -31,8 +31,6 @@ if($aes === '2' && is_file(dirname(__DIR__).'/www/lib/class.aes'.$aes.'.php')) include_once dirname(__DIR__) . '/www/lib/class.aes.php'; } include_once dirname(__DIR__).'/www/lib/class.remote.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; class app_t extends ApplicationCore { public $DB; diff --git a/cronjobs/shop_rueckmeldungen.php b/cronjobs/shop_rueckmeldungen.php index 23fd0527..cd69234e 100644 --- a/cronjobs/shop_rueckmeldungen.php +++ b/cronjobs/shop_rueckmeldungen.php @@ -38,8 +38,6 @@ if($aes == 2 && is_file(dirname(__DIR__).'/www/lib/class.aes2.php')) { else{ include_once dirname(__DIR__) . '/www/lib/class.aes.php'; } -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; $classes = array('briefpapier','lieferschein','auftrag','anfrage','gutschrift','bestellung','rechnung','mahnwesen'); foreach($classes as $class) @@ -64,8 +62,6 @@ include_once(dirname(__FILE__)."/../www/lib/dokumente/class.bestellung.php"); include_once(dirname(__FILE__)."/../www/lib/dokumente/class.rechnung.php"); include_once(dirname(__FILE__)."/../www/lib/dokumente/class.mahnwesen.php");*/ include_once dirname(__DIR__).'/phpwf/plugins/class.string.php'; -require_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; -require_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; if(!class_exists('app_t2')) { class app_t2 extends ApplicationCore { @@ -375,47 +371,6 @@ function GetLaender() const MAXIMUM_NUMBER_OF_TRIES = 10; - $benutzername = $app->erp->Firmendaten("benutzername"); - $passwort = $app->erp->Firmendaten("passwort"); - $host = $app->erp->Firmendaten("host"); - $port = $app->erp->Firmendaten("port"); - $mailssl = $app->erp->Firmendaten("mailssl"); - $mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); - $noauth = $app->erp->Firmendaten("noauth"); - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = 'UTF-8'; - $app->mail->PluginDir='plugins/phpmailer/'; - - if($mailanstellesmtp=='1'){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=='1') { - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = 'tls'; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = 'ssl'; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - - $shops = $app->DB->SelectFirstCols( 'SELECT id FROM shopexport WHERE auftragabgleich = 1 AND aktiv = 1 AND demomodus <> 1 AND sendonlywithtracking = 0' ); diff --git a/cronjobs/shopexport.php b/cronjobs/shopexport.php index 37b527b8..1774079a 100644 --- a/cronjobs/shopexport.php +++ b/cronjobs/shopexport.php @@ -13,10 +13,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) include_once(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php"); }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; @@ -39,30 +35,6 @@ $remote = new Remote($app); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->DB->Select("SELECT benutzername FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$passwort = $app->DB->Select("SELECT passwort FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$host = $app->DB->Select("SELECT host FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$port = $app->DB->Select("SELECT port FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); -$mailssl = $app->DB->Select("SELECT mailssl FROM firmendaten WHERE id='".$firmendatenid."' LIMIT 1"); - -$noauth = $app->erp->Firmendaten("noauth"); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; -//$app->mail->PluginDir="plugins/phpmailer/"; -$app->mail->IsSMTP(); - -if($noauth=="1") $app->mail->SMTPAuth = false; -else $app->mail->SMTPAuth = true; - -if($mailssl) -$app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier -$app->mail->Host = $host; -$app->mail->Port = $port; // set the SMTP port for the GMAIL server - -$app->mail->Username = $benutzername; -$app->mail->Password = $passwort; - $shop=5; //$app->DB->Update("UPDATE artikel SET hersteller='OLIMEX' WHERE hersteller='Olimex Ltd.'"); diff --git a/cronjobs/shopexport_adressexport.php b/cronjobs/shopexport_adressexport.php index f2a66c45..87722d18 100644 --- a/cronjobs/shopexport_adressexport.php +++ b/cronjobs/shopexport_adressexport.php @@ -9,8 +9,6 @@ include_once(dirname(__FILE__)."/../www/lib/class.remote.php"); include_once(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); include_once(dirname(__DIR__)."/phpwf/plugins/class.secure.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); include_once(dirname(__DIR__)."/www/pages/shopimport.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.stringcleaner.php"); */ @@ -63,12 +61,6 @@ if(!class_exists('ShopimportCustom') && { include_once dirname(__DIR__) . '/www/pages/shopimport_custom.php'; } -if(!class_exists('PHPMailer')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'; -} -if(!class_exists('SMTP')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'; -} if(!class_exists('Secure')){ include_once dirname(__DIR__) . '/phpwf/plugins/class.secure.php'; } diff --git a/cronjobs/shopexport_voucher.php b/cronjobs/shopexport_voucher.php index 41a813d5..4b04fb8b 100644 --- a/cronjobs/shopexport_voucher.php +++ b/cronjobs/shopexport_voucher.php @@ -31,8 +31,6 @@ if($aes === '2' && is_file(dirname(__DIR__).'/www/lib/class.aes'.$aes.'.php')) include_once dirname(__DIR__) . '/www/lib/class.aes.php'; } include_once dirname(__DIR__).'/www/lib/class.remote.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; if(!class_exists('app_t')){ class app_t extends ApplicationCore { diff --git a/cronjobs/shopimport.php b/cronjobs/shopimport.php index 083ab765..a9f82c09 100644 --- a/cronjobs/shopimport.php +++ b/cronjobs/shopimport.php @@ -38,12 +38,6 @@ if(!class_exists('AES')){ if(!class_exists('Shopimport')){ include_once(dirname(__DIR__) . '/www/pages/shopimport.php'); } -if(!class_exists('PHPMailer')){ - include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'); -} -if(!class_exists('SMTP')){ - include_once(dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'); -} if(!class_exists('Secure')){ include_once(dirname(__DIR__) . '/phpwf/plugins/class.secure.php'); } @@ -457,46 +451,7 @@ $app->User = new User($app); $app->FormHandler = new FormHandler($app); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); -$benutzername = $app->erp->Firmendaten('benutzername'); -$passwort = $app->erp->Firmendaten('passwort'); -$host = $app->erp->Firmendaten('host'); -$port = $app->erp->Firmendaten('port'); -$mailssl = $app->erp->Firmendaten('mailssl'); -$mailanstellesmtp = $app->erp->Firmendaten('mailanstellesmtp'); -$noauth = $app->erp->Firmendaten('noauth'); - -// mail -$app->mail = new PHPMailer($app); -$app->mail->CharSet = 'UTF-8'; -$app->mail->PluginDir='plugins/phpmailer/'; - -if($mailanstellesmtp=='1'){ - $app->mail->IsMail(); -} else { - $app->mail->IsSMTP(); - - if($noauth=='1') { - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = 'tls'; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = 'ssl'; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password -} $app->DB->Update("UPDATE prozessstarter SET mutexcounter = mutexcounter + 1 WHERE mutex = 1 AND (parameter = 'shopimport') AND aktiv = 1"); if(!$app->DB->Select("SELECT id FROM prozessstarter WHERE mutex = 0 AND parameter = 'shopimport' AND aktiv = 1")) { return; diff --git a/cronjobs/shopimport_auftragarchiv.php b/cronjobs/shopimport_auftragarchiv.php index 2e22cc6b..949e4bb0 100644 --- a/cronjobs/shopimport_auftragarchiv.php +++ b/cronjobs/shopimport_auftragarchiv.php @@ -9,8 +9,6 @@ include_once(dirname(__FILE__)."/../www/lib/class.remote.php"); include_once(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); include_once(dirname(__DIR__)."/phpwf/plugins/class.secure.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); include_once(dirname(__DIR__)."/www/pages/shopimport.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.stringcleaner.php"); */ @@ -63,12 +61,6 @@ if(!class_exists('ShopimportCustom') && { include_once dirname(__DIR__) . '/www/pages/shopimport_custom.php'; } -if(!class_exists('PHPMailer')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'; -} -if(!class_exists('SMTP')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'; -} if(!class_exists('Secure')){ include_once dirname(__DIR__) . '/phpwf/plugins/class.secure.php'; } diff --git a/cronjobs/shopimport_checkorder.php b/cronjobs/shopimport_checkorder.php index 62770062..74c5f9bf 100644 --- a/cronjobs/shopimport_checkorder.php +++ b/cronjobs/shopimport_checkorder.php @@ -8,8 +8,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); include(dirname(__FILE__)."/../www/lib/ShopimporterBase.php"); include(dirname(__FILE__)."/../phpwf/class.application_core.php"); diff --git a/cronjobs/shopimporter_gruppenexport.php b/cronjobs/shopimporter_gruppenexport.php index eddf73da..dd8aa834 100644 --- a/cronjobs/shopimporter_gruppenexport.php +++ b/cronjobs/shopimporter_gruppenexport.php @@ -9,8 +9,6 @@ include_once(dirname(__FILE__)."/../www/lib/class.remote.php"); include_once(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); include_once(dirname(__DIR__)."/phpwf/plugins/class.secure.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); include_once(dirname(__DIR__)."/www/pages/shopimport.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.stringcleaner.php"); */ @@ -63,12 +61,6 @@ if(!class_exists('ShopimportCustom') && { include_once dirname(__DIR__) . '/www/pages/shopimport_custom.php'; } -if(!class_exists('PHPMailer')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.phpmailer.php'; -} -if(!class_exists('SMTP')){ - include_once dirname(__DIR__) . '/www/plugins/phpmailer/class.smtp.php'; -} if(!class_exists('Secure')){ include_once dirname(__DIR__) . '/phpwf/plugins/class.secure.php'; } diff --git a/cronjobs/starter.php b/cronjobs/starter.php index 81f71fc6..d09afe85 100644 --- a/cronjobs/starter.php +++ b/cronjobs/starter.php @@ -32,8 +32,6 @@ if($aes === '2' && is_file(dirname(__DIR__).'/www/lib/class.aes'.$aes.'.php')) include_once dirname(__DIR__) . '/www/lib/class.aes.php'; } include_once dirname(__DIR__).'/www/lib/class.remote.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; class app_t extends ApplicationCore { public $DB; diff --git a/cronjobs/starter2.php b/cronjobs/starter2.php index a992885c..f7814efb 100644 --- a/cronjobs/starter2.php +++ b/cronjobs/starter2.php @@ -32,8 +32,6 @@ if($aes === '2' && is_file(dirname(__DIR__).'/www/lib/class.aes'.$aes.'.php')) include_once dirname(__DIR__) . '/www/lib/class.aes.php'; } include_once dirname(__DIR__).'/www/lib/class.remote.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.phpmailer.php'; -include_once dirname(__DIR__).'/www/plugins/phpmailer/class.smtp.php'; class app_t extends ApplicationCore { public $DB; diff --git a/cronjobs/test.php b/cronjobs/test.php index f01ff4d1..826d5de7 100644 --- a/cronjobs/test.php +++ b/cronjobs/test.php @@ -8,10 +8,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; diff --git a/cronjobs/versandmailsundrueckmeldung.php b/cronjobs/versandmailsundrueckmeldung.php index d97ac0ec..389d02f4 100644 --- a/cronjobs/versandmailsundrueckmeldung.php +++ b/cronjobs/versandmailsundrueckmeldung.php @@ -39,8 +39,6 @@ if($aes == 2 && is_file(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php")) include_once(dirname(__FILE__)."/../www/lib/class.aes".$aes.".php"); }else include_once(dirname(__FILE__)."/../www/lib/class.aes.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); $classes = array('briefpapier','lieferschein','auftrag','anfrage','gutschrift','bestellung','rechnung','mahnwesen'); foreach($classes as $class) @@ -65,8 +63,6 @@ include_once(dirname(__FILE__)."/../www/lib/dokumente/class.bestellung.php"); include_once(dirname(__FILE__)."/../www/lib/dokumente/class.rechnung.php"); include_once(dirname(__FILE__)."/../www/lib/dokumente/class.mahnwesen.php");*/ include_once(dirname(__FILE__)."/../phpwf/plugins/class.string.php"); -require_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); -require_once(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); chdir(__DIR__.'/../www/'); if(!class_exists('app_t2')) @@ -370,40 +366,6 @@ function GetLaender() //ENDE - $benutzername = $app->erp->Firmendaten("benutzername"); - $passwort = $app->erp->Firmendaten("passwort"); - $host = $app->erp->Firmendaten("host"); - $port = $app->erp->Firmendaten("port"); - $mailssl = $app->erp->Firmendaten("mailssl"); - $noauth = $app->erp->Firmendaten("noauth"); - $mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = "UTF-8"; - $app->mail->PluginDir="plugins/phpmailer/"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1") $app->mail->SMTPAuth = false; - else $app->mail->SMTPAuth = true; - - if($mailssl==1) - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - else if ($mailssl==2) - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->DB->Update( "UPDATE `prozessstarter` SET `mutexcounter` = `mutexcounter` + 1 diff --git a/cronjobs/vertriebscockpit.php b/cronjobs/vertriebscockpit.php index 594368a7..161813d8 100644 --- a/cronjobs/vertriebscockpit.php +++ b/cronjobs/vertriebscockpit.php @@ -7,10 +7,6 @@ include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); include(dirname(__FILE__)."/../www/lib/class.remote.php"); include(dirname(__FILE__)."/../www/lib/class.httpclient.php"); include(dirname(__FILE__)."/../www/lib/class.aes.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - class app_t { var $DB; @@ -60,39 +56,6 @@ $app->erp->LogFile("Starte Synchronisation"); $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1"); - -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); -$noauth = $app->erp->Firmendaten("noauth"); - -$app->mail = new PHPMailer($app); -$app->mail->CharSet = "UTF-8"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1") $app->mail->SMTPAuth = false; - else $app->mail->SMTPAuth = true; - - if($mailssl==1) - $app->mail->SMTPSecure = "tls"; // sets the prefix to the servier - else if ($mailssl==2) - $app->mail->SMTPSecure = "ssl"; // sets the prefix to the servier - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $obj = $app->erp->LoadModul('vertriebscockpit'); if($obj) { diff --git a/cronjobs/zahlungsmail.php b/cronjobs/zahlungsmail.php index 6197df5f..e5a2c626 100644 --- a/cronjobs/zahlungsmail.php +++ b/cronjobs/zahlungsmail.php @@ -4,11 +4,6 @@ include(dirname(__FILE__)."/../conf/main.conf.php"); include(dirname(__FILE__)."/../phpwf/plugins/class.mysql.php"); include(dirname(__FILE__)."/../www/lib/imap.inc.php"); include(dirname(__FILE__)."/../www/lib/class.erpapi.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.phpmailer.php"); -include(dirname(__FILE__)."/../www/plugins/phpmailer/class.smtp.php"); - - - class app_t { var $DB; @@ -53,46 +48,6 @@ if(!defined('FPDF_FONTPATH')) define('FPDF_FONTPATH',dirname(__DIR__) . '/www/lib/pdf/font/'); } -$benutzername = $app->erp->Firmendaten("benutzername"); -$passwort = $app->erp->Firmendaten("passwort"); -$host = $app->erp->Firmendaten("host"); -$port = $app->erp->Firmendaten("port"); -$mailssl = $app->erp->Firmendaten("mailssl"); -$mailanstellesmtp = $app->erp->Firmendaten("mailanstellesmtp"); -$noauth = $app->erp->Firmendaten("noauth"); - - // mail - $app->mail = new PHPMailer($app); - $app->mail->CharSet = "UTF-8"; - //$app->mail->PluginDir="plugins/phpmailer/"; - - if($mailanstellesmtp=="1"){ - $app->mail->IsMail(); - } else { - $app->mail->IsSMTP(); - - if($noauth=="1") { - $app->mail->SMTPAuth = false; - } - else { - $app->mail->SMTPAuth = true; - } - - if($mailssl==1){ - $app->mail->SMTPSecure = 'tls'; // sets the prefix to the servier - } - else if ($mailssl==2){ - $app->mail->SMTPSecure = 'ssl'; // sets the prefix to the servier - } - - $app->mail->Host = $host; - - $app->mail->Port = $port; // set the SMTP port for the GMAIL server - - $app->mail->Username = $benutzername; // GMAIL username - $app->mail->Password = $passwort; // GMAIL password - } - $app->DB->Update("UPDATE prozessstarter SET mutexcounter = mutexcounter + 1 WHERE mutex = 1 AND (parameter = 'zahlungsmail' ) AND aktiv = 1"); if(!$app->DB->Select("SELECT id FROM prozessstarter WHERE mutex = 0 AND (parameter = 'zahlungsmail') AND aktiv = 1")) { return;