Pressing the "test connection" button delivers the error

Pressing the "test connection" button delivers the error message "Called Mail() without being connected". The email accounts work properly if I configure them in outlook.

Any explanation? Thanks!