dolibarr  17.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
27 require '../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
29 require_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 
39 if (!$user->admin) {
41 }
42 
43 
44 /*
45  * Actions
46  */
47 
48 if ($action == 'update' && !$cancel) {
49 }
50 
51 
52 
53 /*
54  * View
55  */
56 
57 $form = new Form($db);
58 
59 $linuxlike = 1;
60 if (preg_match('/^win/i', PHP_OS)) {
61  $linuxlike = 0;
62 }
63 if (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 = '';
70 llxHeader('', $langs->trans("Setup"), $wikihelp);
71 
72 print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup');
73 
74 $head = email_admin_prepare_head();
75 
76 // List of sending methods
77 $listofmethods = array();
78 $listofmethods['mail'] = 'PHP mail function';
79 $listofmethods['smtps'] = 'SMTP/SMTPS socket library';
80 if (version_compare(phpversion(), '7.0', '>=')) {
81  $listofmethods['swiftmailer'] = 'Swift Mailer socket library';
82 }
83 
84 // List of oauth services
85 $oauthservices = array();
86 
87 foreach ($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 
103 print dol_get_fiche_head($head, 'common_ingoing', '', -1);
104 
105 print '<br>';
106 print '<span class="opacitymedium">'.$langs->trans("EMailsInGoingDesc", $langs->transnoentitiesnoconv("EmailCollector"))."</span><br>\n";
107 print "<br><br>\n";
108 
109 /*
110 print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
111 print '<table class="noborder centpercent">';
112 print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
113 
114 print '<br>';
115 
116 print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
117 print '<table class="noborder centpercent">';
118 
119 // SMTPS oauth service
120 if (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 
128 print '</table>';
129 print '</div>';
130 */
131 
132 print dol_get_fiche_end();
133 
134 
135 // End of page
136 llxFooter();
137 $db->close();
email_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: admin.lib.php:2016
if(GETPOSTISSET('MAIN_AGENDA_XCAL_EXPORTKEY')) if(GETPOSTISSET('MAIN_AGENDA_EXPORT_PAST_DELAY')) if(GETPOSTISSET('MAIN_AGENDA_EXPORT_CACHE')) if(GETPOSTISSET('AGENDA_EXPORT_FIX_TZ')) if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
Definition: agenda_xcal.php:90
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:56
llxFooter()
Empty footer.
Definition: wrapper.php:70
Class to manage generation of HTML components Only common components must be here.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
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='')
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.