SMTP email problem:- I have made a registration and login form in php. After filling the registration form and clicking on the confirmation mail the user account gets activate.For this i need to send the activation link via email.How can i do this? To be Honest i am new to php and i copy the code from youtube. but don’t know how to send email from localhost?
Share
You can send mail from localhost with sendmail package , sendmail package is inbuild in XAMPP. So if you are using XAMPP then you can easily send mail from localhost.
for example you can configure C:\xampp\php\php.ini and c:\xampp\sendmail\sendmail.ini for gmail to send mail.
in C:\xampp\php\php.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
Now Open C:\xampp\sendmail\sendmail.ini. Replace all the existing code in sendmail.ini with following code
Now you have done!! create php file with mail function and send mail from localhost.