php - How to configure XAMPP to send mail from localhost? -


i trying send mail localhost. unable send mail localhost can tell me how reconfigure xampp send mail localhost

you can send mail localhost sendmail package , sendmail package inbuild in xampp. if using xampp can send mail localhost.

for example can configure c:\xampp\php\php.ini , c:\xampp\sendmail\sendmail.ini gmail send mail.

in c:\xampp\php\php.ini find extension=php_openssl.dll , remove semicolon beginning of line make ssl working gmail localhost.

in php.ini file find [mail function] , change

smtp=smtp.gmail.com smtp_port=587 sendmail_from = my-gmail-id@gmail.com sendmail_path = "\"c:\xampp\sendmail\sendmail.exe\" -t" 

now open c:\xampp\sendmail\sendmail.ini. replace existing code in sendmail.ini following code

[sendmail]  smtp_server=smtp.gmail.com smtp_port=587 error_logfile=error.log debug_logfile=debug.log auth_username=my-gmail-id@gmail.com auth_password=my-gmail-password force_sender=my-gmail-id@gmail.com 

now have done!! create php file mail function , send mail localhost.

ps: don't forgot replace my-gmail-id , my-gmail-password in above code. also, don't forget remove duplicate keys if copied settings above. example comment following line if there sendmail_path : sendmail_path="c:\xampp\mailtodisk\mailtodisk.exe" in php.ini file

also remember restart server using xammp control panel changes take effect.

for gmail please check https://support.google.com/accounts/answer/6010255 allow access less secure apps.

to send email on linux (with sendmail package) through gmail localhost please check php+ubuntu send email using gmail form localhost.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -