EmailJs expects a specific format. Try updating the key value pairs as follows:
to_email: email,
from_name: 'Email Confirmation',
to_name: email.split('@')[0],
message: `Please confirm your email by clicking the link: ${confirmationLink}`
change "to"
to "to_email"
and set "reply_to"
to "to_name"
.
If this doesnt work, make sure your environment variables are properly set in docker and also consider adding logging to help debug errors.