PHPMAILER: set up an external SMTP server or use sendmail
This commit is contained in:
parent
d160dbb64e
commit
b24c5b27c7
418 changed files with 11928 additions and 63103 deletions
|
|
@ -372,6 +372,8 @@ $path = array(
|
|||
,'activate_plugin'=>'ajax_activate_plugin'
|
||||
// set the operation paid or unpaid
|
||||
, 'payment_status'=>'ajax_payment_status'
|
||||
// email setting
|
||||
, 'email_setting'=>'ajax_email_setting'
|
||||
) ;
|
||||
|
||||
if (array_key_exists($op, $path)) {
|
||||
|
|
|
|||
|
|
@ -4101,4 +4101,12 @@ h2.h-section {
|
|||
|
||||
.font-small {
|
||||
font-size: 0.90rem;
|
||||
}
|
||||
|
||||
#form_email_setting_div {
|
||||
align-content: baseline;
|
||||
justify-content: center;
|
||||
align-items: baseline;
|
||||
gap: 5rem;
|
||||
display:flex;flex-direction: row;
|
||||
}
|
||||
|
|
@ -4938,4 +4938,94 @@ Noalyss.prototype.refresh_note=function(jrn_id,dossier_id)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* save parameter for SMPT , menu C0ML
|
||||
*
|
||||
*/
|
||||
Noalyss.prototype.save_config_smtp = function ()
|
||||
{
|
||||
try
|
||||
{
|
||||
waiting_box();
|
||||
var queryString = $("form_config_smtp").serialize(true);
|
||||
console.debug(queryString)
|
||||
queryString['op'] = "email_setting";
|
||||
queryString['op2'] = "save_config_smtp";
|
||||
var action = new Ajax.Request(
|
||||
"ajax_misc.php",
|
||||
{
|
||||
method: 'POST',
|
||||
parameters: queryString,
|
||||
onFailure: ajax_misc_failure,
|
||||
onSuccess: function (req) {
|
||||
remove_waiting_box();
|
||||
if (req.responseText == 'NOCONX') {
|
||||
reconnect();
|
||||
return;
|
||||
}
|
||||
let json = req.evalJSON();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Noalyss.prototype.parameter_display_smtp = function ()
|
||||
{
|
||||
if ($F("smtp_type") == 'smtp') {
|
||||
$("smtp_config_div").style.display = "grid";
|
||||
$('btn_save1').hide();
|
||||
} else {
|
||||
$("smtp_config_div").hide();
|
||||
$('btn_save1').show();
|
||||
|
||||
}
|
||||
};
|
||||
Noalyss.prototype.parameter_test_smtp = function ()
|
||||
{
|
||||
try
|
||||
{
|
||||
var parameter = $('form_config_smtp').serialize(true);
|
||||
parameter['op'] = "email_setting";
|
||||
parameter['op2'] = "parameter_test_smtp";
|
||||
var email = {email_test: $F('email_test_input')};
|
||||
if ($F('email_test_input') == '') {
|
||||
smoke.alert("Aucun email")
|
||||
return false;
|
||||
}
|
||||
waiting_box();
|
||||
var action = new Ajax.Request(
|
||||
"ajax_misc.php",
|
||||
{
|
||||
method: 'GET',
|
||||
parameters: Object.assign(parameter, email),
|
||||
onSuccess: function (req) {
|
||||
remove_waiting_box();
|
||||
if (req.responseText == 'NOCONX') {
|
||||
reconnect();
|
||||
return;
|
||||
}
|
||||
$('result_test_div').update(req.responseText);
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
remove_waiting_box();
|
||||
console.error("parameter_test_smtp" + e.message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
noalyss=new Noalyss();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue