@81ewlska you can send a mail like this:
Get mail server container IP - docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mail
Get relay auth token - docker inspect -f '{{range $index, $value := .Config.Env}}{{if eq (index (split $value "=") 0) "CLOUDRON_RELAY_TOKEN" }}{{range $i, $part := (split $value "=")}}{{if gt $i 1}}{{print "="}}{{end}}{{if gt $i 0}}{{print $part}}{{end}}{{end}}{{end}}{{end}}' mail . Don't ask me how this works, I stole it from Stack overflow 🙂 But essentially, CLOUDRON_RELAY_TOKEN is an environment variable in the container. You can also get this from docker inspect mail | grep CLOUDRON_RELAY_TOKEN and do some string manipulation.
Then, send mail (example.com below is your primary domain):
swaks --server <mail_server_ip> --port 2525 --from no-reply@example.com --to test@cloudron.io \
--body "Test mail from Cloudron" \
--auth-user no-reply@example.com --auth-password <relay_token>
Note: above only works from the server itself. You cannot send mails from outside the server using a token.