Email Sending from Local Server in PHP

后端 未结 2 547
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-21 13:27

I have my file mail.php :






        
2条回答
  •  -上瘾入骨i
    2020-12-21 14:24

    Try this:

    1. Open the php.ini.

    2. Search for the attribute called SMTP in the php.ini file. Generally you can find the line SMTP=localhost. change the localhost to the smtp server name of your ISP. And the set the port of 25.

      SMTP = smtp.gmail.com #user your smtp address here
      smtp_port = 25
      
    3. Restart the apache server or wamp or xammp. Whatever you are using.

    4. Now try to send the mail using the mail() function

提交回复
热议问题