Configure XAMPP php.ini file to send mail from windows localhost

by Dinesh 2014-07-15 13:13:05

You can send mail from windows localhost with sendmail package is inbuild in XAMPP.

You can send mail from Gmail account by modifiying C:xamppphpphp.ini and c:xamppsendmailsendmail.ini files.

in C:xamppphpphp.ini find extension=php_openssl.dll and remove the semicolon from the beginning of that line to make SSL working for gmail for localhost.

in php.ini file find [mail function] and change
 
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = your_gmail_id@gmail.com
sendmail_path = ""C:xamppsendmailsendmail.exe" -t"


Now Open C:xamppsendmailsendmail.ini. Replace all the existing code in sendmail.ini with following code

[sendmail]
 
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=your_gmail_id@gmail.com
auth_password=your_gmail-id_password
force_sender=your_gmail_id@gmail.com

Tagged in:

1175
like
0
dislike
0
mail
flag

You must LOGIN to add comments