dolibarr 19.0.4
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 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
26// Load Dolibarr environment
27require '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
30
31// Load translation files required by the page
32$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors"));
33
34$action = GETPOST('action', 'aZ09');
35$cancel = GETPOST('cancel', 'aZ09');
36
37$trackid = GETPOST('trackid');
38
39if (!$user->admin) {
41}
42
43
44/*
45 * Actions
46 */
47
48if ($action == 'update' && !$cancel) {
49}
50
51
52
53/*
54 * View
55 */
56
57$form = new Form($db);
58
59$linuxlike = 1;
60if (preg_match('/^win/i', PHP_OS)) {
61 $linuxlike = 0;
62}
63if (preg_match('/^mac/i', PHP_OS)) {
64 $linuxlike = 0;
65}
66
67
68//$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails';
69$wikihelp = '';
70llxHeader('', $langs->trans("Setup"), $wikihelp);
71
72print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup');
73
75
76// List of sending methods
77$listofmethods = array();
78$listofmethods['mail'] = 'PHP mail function';
79$listofmethods['smtps'] = 'SMTP/SMTPS socket library';
80if (version_compare(phpversion(), '7.0', '>=')) {
81 $listofmethods['swiftmailer'] = 'Swift Mailer socket library';
82}
83
84// List of oauth services
85$oauthservices = array();
86
87foreach ($conf->global as $key => $val) {
88 if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) {
89 $key = preg_replace('/^OAUTH_/', '', $key);
90 $key = preg_replace('/_ID$/', '', $key);
91 if (preg_match('/^.*-/', $key)) {
92 $name = preg_replace('/^.*-/', '', $key);
93 } else {
94 $name = $langs->trans("NoName");
95 }
96 $provider = preg_replace('/-.*$/', '', $key);
97 $provider = ucfirst(strtolower($provider));
98
99 $oauthservices[$key] = $name." (".$provider.")";
100 }
101}
102
103print dol_get_fiche_head($head, 'common_ingoing', '', -1);
104
105print '<br>';
106print '<span class="opacitymedium">'.$langs->trans("EMailsInGoingDesc", $langs->transnoentitiesnoconv("EmailCollector"))."</span><br>\n";
107print "<br><br>\n";
108
109/*
110print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
111print '<table class="noborder centpercent">';
112print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
113
114print '<br>';
115
116print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
117print '<table class="noborder centpercent">';
118
119// SMTPS oauth service
120if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") {
121 $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE];
122 if (empty($text)) {
123 $text = $langs->trans("Undefined").img_warning();
124 }
125 print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>'.$text.'</td></tr>';
126}
127
128print '</table>';
129print '</div>';
130*/
131
132print dol_get_fiche_end();
133
134
135// End of page
136llxFooter();
137$db->close();
email_admin_prepare_head()
Return array head with list of tabs to view object informations.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage generation of HTML components Only common components must be here.
load_fiche_titre($titre, $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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.