Cant send mail with SMTP with port 25

Hello
I’m having problem sending mail from pim, both on lab- and Prod-server.
I have the same settings as my other systems that wants to send mail, and they work.
I have settings:
server=
port=25
Security=empty
Username=username or empty dose not matter
From-fields as needed

I get the error:
Error 500: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`electric.net' did not match expected CN=`<my e-mail server address that works>'
I have tried playing with settings, but can´t find any that works.
We use our e-mail server address and port 25 on many systems, printers and so on, every unit that has to notify anyone, have this working.

Anyone else having this problem?

Also, this make it so a cant change password on users, because it whants to mail or send notise, but I as an administrator gets error 403 when trying to change password.

It seems to be a problem with using SMTP and port 25 and security none.
I can´t find any other solution just now.

And this error make it so if I try to reset a password of a user, the password sets to NULL in database, and user cant login anymore, and cant reset password because of same “STARTTLS: stream_socket_enable_crypto()” error.

I think there is a bug selecting security none, and the system tries to use TLS anyway.

I’m sorry, the error seems to be at our mail delivery provider, they just escalade an incident with a workaround smtp-server, and this workaround also work in pim.
Now I can reset a users password again, so user can login again.