can't connect to local SMTP server with WLAN

I'm trying to send email by arduino uno r3 as a client.
First I created a SMTP local server in my laptop with hMailserver,
then I connected my laptop to a router with Ethernet cable,
finally I connected my arduino uno r3 to the same router with ethernet cable.
The question is, when I choose the Ethernet IPV4 of my laptop as the local server, then the email can be sent successfully,
But when I unplug the ethernet cable of my laptop and using the WLAN IPV4 address of my laptop as the server, then the arduino can't connect to my local server,
I don't know why.
could you please tell me the principle?

below is my code, the code is working well when I choose the server as the Ethernet IPV4 of my laptop,
But when I unplug the ethernet cable of my laptop and using the WLAN IPV4 address of my laptop as the server, then the arduino can't connect to my local server,

email.ino (4.44 KB)

Sounds like a Windows problem. If the description is correct, you cannot do anything on the Arduino to fix that. My guess is that the Windows machine activates some kind of Firewall if on the WiFi network but that firewall is deactivated if the machine is connected by a cable. Only wild guessing but I would bet that you see the same problem if you try to send an email using another computer and the same IP addresses.