send mail using xampp in php

£可爱£侵袭症+ 提交于 2019-12-03 00:11:14

It's very easy to configure php.ini for sending e-mails from your server.You just need to configure php.ini and sendmail.ini correctly.

First you have to configure sendmail_path in your php.ini file it should have to point to executable sendmail file with proper flags

for example , ;sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t" (which is already in your php.ini file need to just remove comment) and other assignments to sendmail_path need to be commented.

after configuring php.ini file you need to configure sendmail.ini file ,in that

first smtp_server=mail.gmail.com (as you want to use gmail as smtp server), second smtp_port=465 (if not worked try 587), third auth_username= yourid@gmail.com auth_password=yourpassword

after this restart your server.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!