';
+ print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
';
+
+ // Method
+
+ print '| '.$langs->trans("MAIN_MAIL_SENDMODE").' | ';
+
+ // SuperAdministrator access only
+ if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity))
+ {
+ print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING',$listofmethods,$conf->global->MAIN_MAIL_SENDMODE_EMAILING);
+ }
+ else
+ {
+ $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_EMAILING];
+ if (empty($text)) $text = $langs->trans("Undefined");
+ $htmltext = $langs->trans("ContactSuperAdminForChange");
+ print $form->textwithpicto($text,$htmltext,1,'superadmin');
+ print '';
+ }
+ print ' |
';
+
+ // Host server
+
+ print '| ';
+ if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')
+ {
+ print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
+ print ' | ';
+ print $langs->trans("SeeLocalSendMailSetup");
+ }
+ else
+ {
+ $mainserver = (! empty($conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING)?$conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING:'');
+ $smtpserver = ini_get('SMTP')?ini_get('SMTP'):$langs->transnoentities("Undefined");
+ if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
+ else print $langs->trans("MAIN_MAIL_SMTP_SERVER",$smtpserver);
+ print ' | ';
+ // SuperAdministrator access only
+ if (empty($conf->multicompany->enabled) || ($user->admin && ! $user->entity))
+ {
+ print '';
+ print '';
+ print ''.$langs->trans("SeeLocalSendMailSetup").'';
+ }
+ else
+ {
+ $text = ! empty($mainserver) ? $mainserver : $smtpserver;
+ $htmltext = $langs->trans("ContactSuperAdminForChange");
+ print $form->textwithpicto($text,$htmltext,1,'superadmin');
+ print '';
+ }
+ }
+ print ' |
';
+
+ // Port
+
+ print '| ';
+ if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')
+ {
+ print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
+ print ' | ';
+ print $langs->trans("SeeLocalSendMailSetup");
+ }
+ else
+ {
+ $mainport = (! empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '');
+ $smtpport = ini_get('smtp_port')?ini_get('smtp_port'):$langs->transnoentities("Undefined");
+ if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
+ else print $langs->trans("MAIN_MAIL_SMTP_PORT",$smtpport);
+ print ' | ';
+ // SuperAdministrator access only
+ if (empty($conf->multicompany->enabled) || ($user->admin && ! $user->entity))
+ {
+ print '';
+ print '';
+ print ''.$langs->trans("SeeLocalSendMailSetup").'';
+ }
+ else
+ {
+ $text = (! empty($mainport) ? $mainport : $smtpport);
+ $htmltext = $langs->trans("ContactSuperAdminForChange");
+ print $form->textwithpicto($text,$htmltext,1,'superadmin');
+ print '';
+ }
+ }
+ print ' |
';
+
+ // ID
+ if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))))
+ {
+
+ $mainstmpid=(! empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING)?$conf->global->MAIN_MAIL_SMTPS_ID_EMAILING:'');
+ print '| '.$langs->trans("MAIN_MAIL_SMTPS_ID").' | ';
+ // SuperAdministrator access only
+ if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
+ {
+ print '';
+ }
+ else
+ {
+ $htmltext = $langs->trans("ContactSuperAdminForChange");
+ print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING,$htmltext,1,'superadmin');
+ print '';
+ }
+ print ' |
';
+ }
+
+ // PW
+ if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))))
+ {
+
+ $mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING)?$conf->global->MAIN_MAIL_SMTPS_PW_EMAILING:'');
+ print '| '.$langs->trans("MAIN_MAIL_SMTPS_PW").' | ';
+ // SuperAdministrator access only
+ if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity))
+ {
+ print '';
+ }
+ else
+ {
+ $htmltext = $langs->trans("ContactSuperAdminForChange");
+ print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING,$htmltext,1,'superadmin');
+ print '';
+ }
+ print ' |
';
+ }
+
+ // TLS
+
+ print '| '.$langs->trans("MAIN_MAIL_EMAIL_TLS").' | ';
+ if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))))
+ {
+ if (function_exists('openssl_open'))
+ {
+ print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_EMAILING',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING)?$conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING:0),1);
+ }
+ else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
+ }
+ else print yn(0).' ('.$langs->trans("NotSupported").')';
+ print ' |
';
+
+ // STARTTLS
+
+ print '| '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").' | ';
+ if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))))
+ {
+ if (function_exists('openssl_open'))
+ {
+ print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_EMAILING',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING:0),1);
+ }
+ else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
+ }
+ else print yn(0).' ('.$langs->trans("NotSupported").')';
+ print ' |
';
+
+ print '
';
+
+ dol_fiche_end();
+
+ print '