Tâches automatiques (cron) - Symfony 6 - Mutualisé - CRON mailer en erreur
... / Symfony 6 - Mutualisé - C...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Symfony 6 - Mutualisé - CRON mailer en erreur

Von
LucB31
Erstellungsdatum 2023-09-27 10:07:37 (edited on 2024-09-04 11:09:01) in Tâches automatiques (cron)

Bonjour,
il m'est impossible d'envoyer un mail (MailerInterface $mailer) depuis une tâche CRON.
Je précise que les mails fonctionnent très bien depuis l'hébergement (hors CRON).
Hébergement OVH web PRO

En local, la commande "symfony console app:sequence:autocloture" fonctionne très bien : execute une màj en bdd et envoi le mail.
Depuis mon compte SSH, la màj en bdd se fait très bien, mais le mail est en erreur.

Je try / catch
$this->mailer->send($email);
j'obtiens un
$output->writeln("Envoi mail impossible");

Si quelqu'un a une piste, je l'en remercie <3