加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > PHP > 正文

php mail邮件配置方法

发布时间:2020-05-25 01:02:26 所属栏目:PHP 来源:互联网
导读:我们在使用php mail()函数之前,必须先要对php配置文件进行设置。如果不设置,邮件可能无法发送到目的地。本文讲解了windows和linux下邮件的配置方法。

打开etc目录下的php.ini文件,并找到"mail function"

对于windows操作系统,应确保SMTP和sendmail_from都提供。

[mail function]

; For Win32 only.

SMTP = smtp.secureserver.net

; For win32 only

sendmail_from = webmaster@tutorialspoint.com

linux系统只需要设置sendmail_path

[mail function]

; For Win32 only.

SMTP =

; For win32 only

sendmail_from =

; For Unix only

sendmail_path = /usr/sbin/sendmail -t -i

配置好后,我们就可以使用php mail()函数了。

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读