@mail not sending mail in php

后端 未结 5 1376
你的背包
你的背包 2020-12-17 08:00

This is the first time I am using the mail function. I tried to send a mail using this and the code tells me it\'s \"successfully sent\", but I didn\'t receive any mail. I\'

5条回答
  •  再見小時候
    2020-12-17 08:46

    First, I would make sure that port 25 is open. Determine the public IP address of the server by connecting to WhatsMyIP.org (from the same internet connection that the server uses) then try the following from the command line:

    telnet xxx.xxx.xxx.xxx 25
    

    (replace xxx.xxx.xxx.xxx with the IP from WhatsMyIP.org)

    If you can connect, then this answer isn't for you. Sorry.

    If not, check all of your local firewall settings to make sure that port 25 is open on your end. Port 25 may also be blocked by the ISP. It turns out that some (maybe most) ISPs block port 25 by default to prevent spam.

    Misconfigured email servers are easily compromised and used in spam botnets. I had to call Comcast and jump through hoops to get them to unblock port 25 before I could get my home email server working. (Comcast forum post about port 25).

    If that doesn't get you going, I'd take another look at the email server configuration.

提交回复
热议问题