com.sun.mail.util.MailConnectException: Couldn't connect to host, port: 127.0.0.1, 25; timeout -1

Hello,
When I try to send a mail (line #set($result = $xwiki.mailsender.sendTextMessage("bird95@hotmail.fr","bird95@hotmail.fr", "bird95@hotmail.fr", "bird95@hotmail.fr"))

I have the error
com.sun.mail.util.MailConnectException: Couldn’t connect to host, port: 127.0.0.1, 25; timeout -1
Caused by: java.net.ConnectException: Connection refused: connect

I verified the firewall and it seems good…

Do you have an idea ?
Thanks,
Arnaud

Yes XWiki cannot connect to the mail server located at 127.0.0.1 on port 25 :slight_smile: Trying doing a telnet on the XWiki server machine on port 25.

I have installed telnet on my Windows computer,
I do

telnet 127.0.0.1 25

or

telnet http://hv-105.hv.com 25 (The complet url to run XWIKI is http://hv-105.hv.com:8080)

But i have the error

Connexion à 127.0.0.1…Impossible d’ouvrir une connexion à l’hôte, sur le por
25: Échec lors de la connexion (Connection at 127.0.0.1… Impossible to open a connection on host, on the port 25: Echec when connection)

I am beginner…

Thanks,
Arnaud

It just means your local mail server is not installed or not properly configured. Maybe you don’t have one? :slight_smile: There’s nothing we can do here since it’s not related to XWiki.

Just ask some admin where is your mail server to use.