Thanks again.
I used the settings:
MAILER_ENABLED=1
MAILER_HOST=smtp.example.com
MAILER_PORT=465
MAILER_SECURE=1
MAILER_AUTH_USER=mail@example.com
MAILER_AUTH_PASSWORD=password
MAILER_NOREPLY_NAME=JoplinServer
MAILER_NOREPLY_EMAIL=noreply@example.com
in a separate env file with all the other Joplin Server environment variables. I also found that I had to connect port 465 from the container to 465 on the host before the messages got out so my docker-compose.yml file contained:
version: '3'
services:
server:
image: joplin/server:2.2.6-beta
ports:
- "22300:22300"
- "465:465"
env_file: .env
Anyway, it now works!