On complete doc doxygen
This commit is contained in:
parent
f4f577b319
commit
fac3fb3be8
@ -166,7 +166,7 @@ class CMailFile
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dolibarr_syslog("CMailFile::sendfile addr_to=".$this->addr_to.", subject=".$this->subject);
|
dolibarr_syslog("CMailFile::sendfile addr_from=".$this->addr_from.", addr_to=".$this->addr_to.", subject=".$this->subject);
|
||||||
dolibarr_syslog("CMailFile::sendfile header=\n".$this->headers);
|
dolibarr_syslog("CMailFile::sendfile header=\n".$this->headers);
|
||||||
//dolibarr_syslog("CMailFile::sendfile message=\n".$message);
|
//dolibarr_syslog("CMailFile::sendfile message=\n".$message);
|
||||||
//$this->send_to_file();
|
//$this->send_to_file();
|
||||||
@ -178,13 +178,19 @@ class CMailFile
|
|||||||
|
|
||||||
if (! $conf->global->MAIN_DISABLE_ALL_MAILS)
|
if (! $conf->global->MAIN_DISABLE_ALL_MAILS)
|
||||||
{
|
{
|
||||||
|
// Si Windows, addr_from doit obligatoirement etre défini
|
||||||
if (isset($_SERVER["WINDIR"]))
|
if (isset($_SERVER["WINDIR"]))
|
||||||
{
|
{
|
||||||
|
if (! $this->addr_from) $this->addr_from = 'robot@mydomain.com';
|
||||||
|
if ($this->addr_from) @ini_set('sendmail_from',getValidAddress($this->addr_from,2));
|
||||||
|
|
||||||
|
// Forcage parametres
|
||||||
|
// \TODO A mettre pout tout OS ?
|
||||||
if ($conf->global->MAIN_MAIL_SMTP_SERVER) ini_set('SMTP',$conf->global->MAIN_MAIL_SMTP_SERVER);
|
if ($conf->global->MAIN_MAIL_SMTP_SERVER) ini_set('SMTP',$conf->global->MAIN_MAIL_SMTP_SERVER);
|
||||||
if ($conf->global->MAIN_MAIL_SMTP_PORT) ini_set('smtp_port',$conf->global->MAIN_MAIL_SMTP_PORT);
|
if ($conf->global->MAIN_MAIL_SMTP_PORT) ini_set('smtp_port',$conf->global->MAIN_MAIL_SMTP_PORT);
|
||||||
if ($this->addr_from) ini_set('sendmail_from',getValidAddress($this->addr_from,2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$dest=getValidAddress($this->addr_to,2);
|
$dest=getValidAddress($this->addr_to,2);
|
||||||
if (! $dest)
|
if (! $dest)
|
||||||
{
|
{
|
||||||
@ -215,11 +221,15 @@ class CMailFile
|
|||||||
dolibarr_syslog("CMailFile::sendfile: mail end success");
|
dolibarr_syslog("CMailFile::sendfile: mail end success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SERVER["WINDIR"]))
|
if (isset($_SERVER["WINDIR"]))
|
||||||
{
|
{
|
||||||
|
@ini_restore('sendmail_from');
|
||||||
|
|
||||||
|
// Forcage parametres
|
||||||
|
// \TODO A mettre pout tout OS ?
|
||||||
if ($conf->global->MAIN_MAIL_SMTP_SERVER) ini_restore('SMTP');
|
if ($conf->global->MAIN_MAIL_SMTP_SERVER) ini_restore('SMTP');
|
||||||
if ($conf->global->MAIN_MAIL_SMTP_PORT) ini_restore('smtp_port');
|
if ($conf->global->MAIN_MAIL_SMTP_PORT) ini_restore('smtp_port');
|
||||||
ini_restore('sendmail_from');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user