Uh oh!
There was an error while loading. Please reload this page.
Multiple messages with send_mail function #1364
Answered
byDSMejantel
DSMejantel
asked this question in
Q&A
Answered by
DSMejantel
Aug 6, 2026
Replies: 2 comments
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi ! run_sql does sound like the solution to your problem, why doesn't it work ? you can use it to summarize the results of all your send_mail calls
|
0 replies
Hi lovasoa ! So : -- Exécution muette des envois de mail (via le fichier envoi_alerte.sql)SET mail_results =sqlpage.run_sql('envoi_alerte.sql'); envoi_alerte.sql SELECTsqlpage.send_mail(json_object(
'to', courriel,
'subject', 'Alerte Barjac Mobilités',
'body', 'Bonjour '||user_id||'. Un conducteur propose un trajet vers une de vos destinations demandées : '|| arrivee ||', le '|| strftime('%d/%m/%Y',jour) ||' pour une arrivée vers '|| heure||'. Vous pouvez consulter https://covoiturage.barjac-en-lozere.fr pour réserver votre place.'
)) FROM alerte WHERE courriel IS NOT NULLAND courriel !='' |
0 replies
Answer selected byDSMejantel
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi lovasoa !
You're right. I have the soluce with sqlpage.run_sql but I have another error in my file !
So :
envoi_alerte.sql