Bileto qui n'envoi pas de mail

What app is this about, and its version: 0.15.4~ynh1
What YunoHost version are you running: 12.1.39 (stable).
What type of hardware are you using: VPS bought online

Describe your issue

Bonjour,
J’arrive à recevoir les adresses mail mais j’ai une erreur pour l’envoi.

Share relevant logs or error messages

Voici les logs : hastebin
Visiblement Error: “Handling “App\Message\SendMessageEmail” failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=ndd.fr did not match expected CN=localhost’” [“class” => “App\Message\SendMessageEmail”,“message_id” => 19,“retryCount” => 3,“error” => “Handling “App\Message\SendMessageEmail” failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=ndd.fr did not match expected CN=localhost’”,“exception” => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]

Ton domaine ne semble pas bien renseigné :slight_smile:

Tu as un CN ndd.fr

et un CN = localhost

La configuration est décrite dans la documentation domaines et “Vos propres domaines”.

Bonjour,

Je n’ai aucun retour du diagnostic pouvant remonter un problème de DNS, la configuration as été fait.

Bileto est installer sur un sous domaine et l’adresse mail en le nom de domaine. Le soucis pourrait venir de la ?

Perso, je lis ça.
Dans les logs, je vois aussi : Peer certificate ``` CN=dupn.fr ```` ’ did not match expected CN=`localhost’ ``

Donc il y a un soucis de conf sur votre domaine ou sous domaine.

Je n’ai pas d’erreur via le diagnostique vous me conseiller donc de reprendre les enregistrements DNS de mon sous-somaine ?

Je serais tenté de vous indiquer de vérifier quel outil est configuré sur le domaine localhost.

Est-ce que votre Yunohost envoie des emails sur le domaine principal ?
Est-ce que votre Yunohost envoie des emails sur le sous-domaine ?

Je ne sert pas de domaine localhost. Je suis héberger sur un VPS OVH.

Et je n’ai pas de nom de domaine localhost même en SSH.,

Les mails envoyé via le domaine principal sont reçu et envoyé par nextcloud.

Yunohost est autorisé à envoye des mails dans tout les cas.

Essai de modifier la configuration de l’application :

yunohost app shell bileto

nano .env

Cherche la ligne commençant par MAILER_DSN et remplace “localhost” par le nom de domaine de l’application et 25 par 587

La ligne suivante commençant par MAILER_FROM, remplace “support” par “bileto”

Puis réessayes d’envoyer des mails

Toujour une erreur :

May 06 09:28:35 php8.4[251934]: {"message":"Received message App\\Message\\SendMessageEmail","context":{"class":"App\\Message\\SendMessageEmail"},"level":200,"level_name":"INFO","channel":"messenger","datetime":"2026-05-06T09:28:35.349052+00:00","extra":{}}
May 06 09:28:35 php8.4[251934]: {"message":"Email transport \"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport\" starting","context":{},"level":100,"level_name":"DEBUG","channel":"mailer","datetime":"2026-05-06T09:28:35.354938+00:00","extra":{}}
May 06 09:28:35 php8.4[251934]: {"message":"Error thrown while handling message App\\Message\\SendMessageEmail. Removing from transport after 3 retries. Error: \"Handling \"App\\Message\\SendMessageEmail\" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'\"","context":{"class":"App\\Message\\SendMessageEmail","message_id":49,"retryCount":3,"error":"Handling \"App\\Message\\SendMessageEmail\" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception":{"class":"Symfony\\Component\\Messenger\\Exception\\HandlerFailedException","message":"Handling \"App\\Message\\SendMessageEmail\" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","code":0,"file":"/var/www/bileto/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:124","previous":{"class":"Symfony\\Component\\Mailer\\Exception\\TransportException","message":"Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","code":0,"file":"/var/www/bileto/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:171"}}},"level":500,"level_name":"CRITICAL","channel":"messenger","datetime":"2026-05-06T09:28:35.403148+00:00","extra":{}}
May 06 09:28:35 php8.4[251934]: 09:28:35 CRITICAL  [messenger] Error thrown while handling message App\Message\SendMessageEmail. Removing from transport after 3 retries. Error: "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'" ["class" => "App\Message\SendMessageEmail","message_id" => 49,"retryCount" => 3,"error" => "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]

Je me demande si j’ai pas un soucis de façon globale sur l’envoie de mail :

j’ai tester via agorakit mail de création de compte reçu vers une adresse mail de yunohost mais pas contre pour une adresse Gmail je ne reçois pas de mail ni en spam.

As tu redémarré php8.4?

Alors j’avais pas redémarer Php je viens de le faire même résultat.

D’accord

Donc, dans MAILER_DSN, remets localhost:25 puis ajoutes ?auto_tls=false

Ça donnera localhost:25?auto_tls=false à la fin de la ligne

Même erreur : En relançais NGINX

May 07 16:00:06 php8.4[286499]: {"message":"User Deprecated: Not enabling raw field value access for the Criteria matching API in Doctrine\\Common\\Collections\\Criteria is deprecated. Raw field access will be the only supported method in 3.0 (Criteria.php:76 called by Ticket.php:444, https://github.com/doctrine/collections/pull/472, package doctrine/collections)","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Not enabling raw field value access for the Criteria matching API in Doctrine\\Common\\Collections\\Criteria is deprecated. Raw field access will be the only supported method in 3.0 (Criteria.php:76 called by Ticket.php:444, https://github.com/doctrine/collections/pull/472, package doctrine/collections)","code":0,"file":"/var/www/bileto/vendor/doctrine/deprecations/src/Deprecation.php:208"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-05-07T16:00:06.148008+00:00","extra":{}}
May 07 16:00:06 php8.4[286499]: 16:00:06 WARNING   [messenger] Error thrown while handling message App\Message\SendMessageEmail. Sending for retry #1 using 1034 ms delay. Error: "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'" ["class" => "App\Message\SendMessageEmail","message_id" => 74,"retryCount" => 1,"delay" => 1034,"error" => "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]
May 07 16:00:07 php8.4[286499]: 16:00:07 WARNING   [messenger] Error thrown while handling message App\Message\SendMessageEmail. Sending for retry #2 using 2148 ms delay. Error: "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'" ["class" => "App\Message\SendMessageEmail","message_id" => 75,"retryCount" => 2,"delay" => 2148,"error" => "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]
May 07 16:00:09 php8.4[286499]: 16:00:09 WARNING   [messenger] Error thrown while handling message App\Message\SendMessageEmail. Sending for retry #3 using 3682 ms delay. Error: "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'" ["class" => "App\Message\SendMessageEmail","message_id" => 76,"retryCount" => 3,"delay" => 3682,"error" => "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]
May 07 16:00:12 php8.4[286499]: {"message":"Received message App\\Message\\SendMessageEmail","context":{"class":"App\\Message\\SendMessageEmail"},"level":200,"level_name":"INFO","channel":"messenger","datetime":"2026-05-07T16:00:12.445664+00:00","extra":{}}
May 07 16:00:12 php8.4[286499]: {"message":"Email transport \"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport\" starting","context":{},"level":100,"level_name":"DEBUG","channel":"mailer","datetime":"2026-05-07T16:00:12.451417+00:00","extra":{}}
May 07 16:00:12 php8.4[286499]: {"message":"Error thrown while handling message App\\Message\\SendMessageEmail. Removing from transport after 3 retries. Error: \"Handling \"App\\Message\\SendMessageEmail\" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'\"","context":{"class":"App\\Message\\SendMessageEmail","message_id":77,"retryCount":3,"error":"Handling \"App\\Message\\SendMessageEmail\" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception":{"class":"Symfony\\Component\\Messenger\\Exception\\HandlerFailedException","message":"Handling \"App\\Message\\SendMessageEmail\" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","code":0,"file":"/var/www/bileto/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:124","previous":{"class":"Symfony\\Component\\Mailer\\Exception\\TransportException","message":"Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","code":0,"file":"/var/www/bileto/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:171"}}},"level":500,"level_name":"CRITICAL","channel":"messenger","datetime":"2026-05-07T16:00:12.500950+00:00","extra":{}}
May 07 16:00:12 php8.4[286499]: 16:00:12 CRITICAL  [messenger] Error thrown while handling message App\Message\SendMessageEmail. Removing from transport after 3 retries. Error: "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'" ["class" => "App\Message\SendMessageEmail","message_id" => 77,"retryCount" => 3,"error" => "Handling "App\Message\SendMessageEmail" failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`dupn.fr' did not match expected CN=`localhost'","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]

Donc, j’ai pris le temps d’installer l’app et tester (juste le mail de réinitialisation du mot de passe)

Ce qui fonctionne :

Tu peux l’essayer en installant la branche testing

sudo yunohost app upgrade bileto -u https://github.com/YunoHost-Apps/bileto_ynh/tree/testing

Il fallait peut être redémarrer le service bileto aussi

Merci de ton aide.

J’ai mis a voir vers la version de testing. Rédemarrer Nginx+ Bileto (je le fesait avant aussi)

Essayer d’envoyé un mail erreur (toujours la même).

J’ai essayé de modifier les paramètres mon mdp est correct j’arrive à me connecter via yunohost.

Rédemarrer Nginx+ Bileto. Erreur toujours la même.

Si cela marche de ton coté je dois faire quelques chose mail :

Voici les lignes avec ma configuration :

Ce ne serait pas plutôt le nom de l’app (bileto) à la place de support ?
L’authentification échoue avec un utilisateur inexistant.

1 Like

L’utilisateur “support” et l’adresse mail “support@…” n’existent pas.

Après la mise à jour vers la branche testing, le fichier “.env.local” ne devrait pas contenir ce que tu viens de partager. (le fichier “.env” ne doit pas être modifié)

Oups j’ai remis le fichier.

Et nouvelle erreur :

May 08 18:35:59 php8.4[379612]:  [OK] Consuming messages from transports "async, scheduler_default".
May 08 18:35:59 php8.4[379612]:  // The worker will automatically exit once it has been running for 3600s or
May 08 18:35:59 php8.4[379612]:  // received a stop signal via the messenger:stop-workers command.
May 08 18:35:59 php8.4[379612]:  // Quit the worker with CONTROL-C.
May 08 18:35:59 php8.4[379612]:  // Re-run the command with a -vv option to see logs about consumed messages.
May 08 18:35:59 php8.4[379612]: {"message":"User Deprecated: Since symfony/var-exporter 7.3: The \"Symfony\\Component\\VarExporter\\LazyGhostTrait\" trait is deprecated, use native lazy objects instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since symfony/var-exporter 7.3: The \"Symfony\\Component\\VarExporter\\LazyGhostTrait\" trait is deprecated, use native lazy objects instead.","code":0,"file":"/var/www/bileto/vendor/symfony/var-exporter/LazyGhostTrait.php:21"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2026-05-08T18:35:59.292252+00:00","extra":{}}

Arrives-tu à envoyer des mails ?
L’erreur mentionnée est un avertissement mais n’a pas l’air bloquant ni en lien.