* Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/admin/mails_ingoing.php * \brief Page to setup emails entry */ // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors")); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $trackid = GETPOST('trackid'); if (!$user->admin) { accessforbidden(); } /* * Actions */ if ($action == 'update' && !$cancel) { } /* * View */ $form = new Form($db); $linuxlike = 1; if (preg_match('/^win/i', PHP_OS)) { $linuxlike = 0; } if (preg_match('/^mac/i', PHP_OS)) { $linuxlike = 0; } //$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails'; $wikihelp = ''; llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-mails_ingoing'); print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup'); $head = email_admin_prepare_head(); // List of sending methods $listofmethods = array(); $listofmethods['mail'] = 'PHP mail function'; $listofmethods['smtps'] = 'SMTP/SMTPS socket library'; if (version_compare(phpversion(), '7.0', '>=')) { $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; } // List of oauth services $oauthservices = array(); foreach ($conf->global as $key => $val) { if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { $key = preg_replace('/^OAUTH_/', '', $key); $key = preg_replace('/_ID$/', '', $key); if (preg_match('/^.*-/', $key)) { $name = preg_replace('/^.*-/', '', $key); } else { $name = $langs->trans("NoName"); } $provider = preg_replace('/-.*$/', '', $key); $provider = ucfirst(strtolower($provider)); $oauthservices[$key] = $name." (".$provider.")"; } } print dol_get_fiche_head($head, 'common_ingoing', '', -1); print '
'; print ''.$langs->trans("EMailsInGoingDesc", $langs->transnoentitiesnoconv("EmailCollector"))."
\n"; print "

\n"; /* print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table print ''; print ''; print '
'; print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; // SMTPS oauth service if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") { $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE]; if (empty($text)) { $text = $langs->trans("Undefined").img_warning(); } print ''; } print '
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''.$text.'
'; print '
'; */ print dol_get_fiche_end(); // End of page llxFooter(); $db->close();