Compare commits

..

No commits in common. "bc2e2b4e4c7173b427f22dec3fd3f493460cb3f7" and "d649c11821ac391c992994613c045d19450cb3fd" have entirely different histories.

6 changed files with 8 additions and 43 deletions

View File

@ -293,10 +293,7 @@
<!-- EMAIL -->
<variable type='string' name='ninegate_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
<variable type="oui/non" name='ninegate_activer_localmail' description="Utiliser le serveur d'envoi de mail local" mandatory='True'>
<value>oui</value>
</variable>
<variable type='string' name='ninegate_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
<variable type='string' name='ninegate_smtphost' description='Host du serveur SMTP' />
<variable type='string' name='ninegate_smtpport' description='Port du serveur SMTP' />
<variable type='string' name='ninegate_smtpuser' description='Compte du serveur SMTP' />
@ -394,7 +391,6 @@
<target type='variable'>ninegate_activate_websocket</target>
<target type='variable'>ninegate_noreply</target>
<target type='variable'>ninegate_activer_localmail</target>
<target type='variable'>ninegate_smtphost</target>
<target type='variable'>ninegate_smtpport</target>
<target type='variable'>ninegate_smtpuser</target>
@ -1141,17 +1137,6 @@
</auto>
<!-- AFFICHAGE EN FONCTION DU MAIL -->
<condition name='hidden_if_in' source='ninegate_activer_localmail'>
<param>oui</param>
<target type='variable'>ninegate_smtphost</target>
<target type='variable'>ninegate_smtpport</target>
<target type='variable'>ninegate_smtpuser</target>
<target type='variable'>ninegate_smtppwd</target>
<target type='variable'>ninegate_smtpencryption</target>
<target type='variable'>ninegate_smtpauthmode</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODE DE BDD -->

View File

@ -29,7 +29,7 @@ services:
public: true
tags: ['controller.service_arguments']
swiftmailer.mailer.sendmail.transport:
class: Swift_SendmailTransport
public: true
arguments: ['/usr/sbin/sendmail -t']
# add more services, or override services that need manual wiring
# AppBundle\Service\ExampleService:
# arguments:
# $someArgument: 'some_value'

View File

@ -1,10 +1,4 @@
#!/bin/bash
cd /var/www/html/ninegate
ninegate_activer_localmail=$(CreoleGet ninegate_activer_localmail non)
if [[ "$ninegate_activer_localmail" = 'oui' ]]
then
php bin/console swiftmailer:spool:send --message-limit=100 --env=prod --transport swiftmailer.mailer.sendmail.transport
else
php bin/console swiftmailer:spool:send --message-limit=100 --env=prod
fi
php bin/console swiftmailer:spool:send --message-limit=100 --env=prod

View File

@ -2,7 +2,6 @@
namespace Cadoles\CronBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
@ -13,7 +12,7 @@ use Symfony\Component\HttpFoundation\Response;
use Cadoles\CronBundle\Entity\Cron;
class MailCommand extends ContainerAwareCommand
class MailCommand extends Command
{
private $container;
private $em;
@ -42,8 +41,6 @@ class MailCommand extends ContainerAwareCommand
$this->filesystem = new Filesystem();
$this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/";
$mailer_host = $this->getContainer()->getParameter('cron_activate');
$this->writelnred('');
$this->writelnred('== Cron:Mail');
$this->writelnred('==========================================================================================================');
@ -51,10 +48,6 @@ class MailCommand extends ContainerAwareCommand
$command = $this->getApplication()->find("swiftmailer:spool:send");
$tbparameter["--message-limit"]=100;
$tbparameter["--env"]="prod";
if($mailer_host=="/usr/sbin/sendmail")
$tbparameter["--transport"]="swiftmailer.mailer.sendmail.transport";
$parameter = new ArrayInput($tbparameter);
try{
$returnCode = $command->run($parameter, $output);

View File

@ -30,12 +30,6 @@ parameters:
database_name: ninegate
database_user: ninegate
database_password: "changeme"
%if %%getVar("ninegate_activer_localmail", 'non') == "oui"
mailer_transport: sendmail
mailer_host: '/usr/sbin/sendmail'
mailer_user: ~
mailer_password: ~
%else
mailer_transport: smtp
%if %%is_defined("ninegate_smtphost")
mailer_host: '%%ninegate_smtphost'
@ -45,6 +39,5 @@ parameters:
mailer_host: 'localhost'
mailer_user: ''
mailer_password: ''
%end if
%end if
secret: ThisTokenIsNotSoSecretChangeIt

View File

@ -408,7 +408,7 @@ parameters:
mailer_port: '2525'
mailer_encryption: null
mailer_authmode: null
noreply: %%ninegate_noreply
noreply: %%system_mail_to
%end if
# Doctrine Configuration