PHP send email configuration in XAMPP

本文介绍如何通过三个步骤配置XAMPP来使用Gmail账户发送邮件:修改sendmail.ini设置SMTP服务器和端口,指定用户名及密码;更新php.ini文件中的sendmail路径;确保Gmail允许不安全应用访问。
A few XAMPP configuration points to send the email from PHP by using gmail account,


1, \xampp\sendmail\sendmail.ini
smtp_server=smtp.gmail.com
smtp_port=587
auth_username=huilin.xiong@gmail.com (your gmail account)
auth_password=your passowrd


2, \xampp\php\php.ini
sendmail_path = "\"D:\PHP\xampp\sendmail\sendmail.exe\" -t"


3, gmail account sign-in & security setting, 
set Allow less secure apps: ON
If this is not set, the sending email will fail.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值