@mathieuepitech Apps on Cloudron send email with a specific email id and with a SMTP username/password. This is not just a security measure but also prevents misconfigured apps from sending emails with arbitrary domains resulting in your server being blacklisted as a spam bot.
The specific email id/mail from that the app will use is the in the app configure dialog. The SMTP credentials for sending email are available as environment variables. In PHP, you can simply use getenv('MAIL_SMTP_SERVER') etc instead of hardcoding the credentials.