dolibarr 21.0.0-beta
mails_ingoing.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2007-2020 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
5 * Copyright (C) 2016 Jonathan TISSEAU <jonathan.tisseau@86dev.fr>
6 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
27// Load Dolibarr environment
28require '../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
31
40// Load translation files required by the page
41$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors"));
42
43$action = GETPOST('action', 'aZ09');
44$cancel = GETPOST('cancel', 'aZ09');
45
46$trackid = GETPOST('trackid');
47
48if (!$user->admin) {
50}
51
52
53/*
54 * Actions
55 */
56
57if ($action == 'update' && !$cancel) {
58}
59
60
61
62/*
63 * View
64 */
65
66$form = new Form($db);
67
68$linuxlike = 1;
69if (preg_match('/^win/i', PHP_OS)) {
70 $linuxlike = 0;
71}
72if (preg_match('/^mac/i', PHP_OS)) {
73 $linuxlike = 0;
74}
75
76
77//$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails';
78$wikihelp = '';
79llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-mails_ingoing');
80
81print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup');
82
84
85// List of sending methods
86$listofmethods = array();
87$listofmethods['mail'] = 'PHP mail function';
88$listofmethods['smtps'] = 'SMTP/SMTPS socket library';
89if (version_compare(phpversion(), '7.0', '>=')) {
90 $listofmethods['swiftmailer'] = 'Swift Mailer socket library';
91}
92
93// List of oauth services
94$oauthservices = array();
95
96foreach ($conf->global as $key => $val) {
97 if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) {
98 $key = preg_replace('/^OAUTH_/', '', $key);
99 $key = preg_replace('/_ID$/', '', $key);
100 if (preg_match('/^.*-/', $key)) {
101 $name = preg_replace('/^.*-/', '', $key);
102 } else {
103 $name = $langs->trans("NoName");
104 }
105 $provider = preg_replace('/-.*$/', '', $key);
106 $provider = ucfirst(strtolower($provider));
107
108 $oauthservices[$key] = $name." (".$provider.")";
109 }
110}
111
112print dol_get_fiche_head($head, 'common_ingoing', '', -1);
113
114print '<br>';
115print '<span class="opacitymedium">'.$langs->trans("EMailsInGoingDesc", $langs->transnoentitiesnoconv("EmailCollector"))."</span><br>\n";
116print "<br><br>\n";
117
118/*
119print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
120print '<table class="noborder centpercent">';
121print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
122
123print '<br>';
124
125print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
126print '<table class="noborder centpercent">';
127
128// SMTPS oauth service
129if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") {
130 $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')];
131 if (empty($text)) {
132 $text = $langs->trans("Undefined").img_warning();
133 }
134 print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>'.$text.'</td></tr>';
135}
136
137print '</table>';
138print '</div>';
139*/
140
141print dol_get_fiche_end();
142
143
144// End of page
145llxFooter();
146$db->close();
email_admin_prepare_head()
Return array head with list of tabs to view object information.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage generation of HTML components Only common components must be here.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.