Lets start:-
first always make a backup before changing any code in core/configuration files.
then
Edit your php.ini in - “xampp\php\php.ini”
Before Changes:----------------------------
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost
; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
;sendmail_path = "\"\XAMPP\sendmail\sendmail.exe\" -t"
After Changes :-
-----------------------
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.gmail.com
; http://php.net/smtp-port
smtp_port = 587
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = yourgmailid@gmail.com
; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"\XAMPP\sendmail\sendmail.exe\" -t"
now
Edit your sendmail.ini - “xampp\sendmail\sendmail.ini”
; smtp port (normally 25)
; smtp port (normally 25)
- You Need to restart xampp after saving both files.
- Change yourgmailid@gmail.com & your gmail password with your own email id and password
- You Need to enable SMTP in your GMail to make this work and all sender will be from your email (if need).
Enable Send Email in XAMPP (localhost)
In this tutorial, i will share how to send Email from XAMPP (PHP). i use XAMPP 1.8.1 version .This has been tested by me and it worked. L...