mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Working smtp for email
This commit is contained in:
parent
379eaa2786
commit
48ef0c063e
8 changed files with 49 additions and 35 deletions
|
@ -50,6 +50,8 @@ class Launcher extends AbstractDaemon
|
|||
$this->start_sender_daemon();
|
||||
|
||||
$this->start_webhook_daemon();
|
||||
|
||||
$this->start_mailer_daemon();
|
||||
|
||||
$phones = $this->internal_phone->get_all();
|
||||
$this->start_phones_daemons($phones);
|
||||
|
@ -74,6 +76,25 @@ class Launcher extends AbstractDaemon
|
|||
$pid = null;
|
||||
exec('php ' . PWD . '/console.php controllers/internals/Console.php sender > /dev/null 2>&1 &');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to start mailer daemon.
|
||||
*/
|
||||
public function start_mailer_daemon()
|
||||
{
|
||||
$name = 'RaspiSMS Daemon Mailer';
|
||||
$pid_file = PWD_PID . '/' . $name . '.pid';
|
||||
|
||||
if (file_exists($pid_file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Create a new daemon for sender
|
||||
$pid = null;
|
||||
exec('php ' . PWD . '/console.php controllers/internals/Console.php mailer > /dev/null 2>&1 &');
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to start webhook daemon.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue