Send Email using XAMPP | Send Email from localhost by using WordPress

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Welcome to webstylepress we  have got this wordpress setup   i am at the local host this is wordpress  page we have set up this page and this is   short code from contact form 7. this  is contact form 7 that is being used very simple form it should send email test name test email and then test subject test message and submit ah  there's an error okay so i do a lot of php and   wordpress-based work on localhost and then  migrate to live if i have to check email i   have to migrate code to live again and again  to just check if email is working properly   this is a time waste to avoid it our local host  should send emails to send emails from localhost   or xampp we will have to configure xampp we  have to configure xampp to send email via smtp   we use gmail smtp to send emails via xampp because  gmail is powerful and flexible basically create a   separate gmail account to only use smtp because we  will have to use a real email address and password   for gmail account in xampp settings now we  will configure our xampp so that we can send   this email from localhost and from wordpress  without needing a live server okay so go to xampp   i have installed xampp in my e drive  it's not in my c drive okay from xampp   search for php folder in php folder search  for php.ini open it in editor code editor   and then search for smtp edit smtp settings  so this is smtp smtp should be smtp.gmail.com   and it should not be commented code or lines with  semicolon are kinda comment these will not work   there should not be a semicolon before the lines  that we are using so smtp should be smtp.gmail.com then we have got smtp port it should be 587 that  is for gmail then we have got send email from this   should be your email address a real gmail address  and then we have got send mail underscore path   this should be path to this file send  mail.exe it will be in your xampp folder xampp   send mail to xampp send mail and  we have got the send sendmail.exe   this path should be correct now go to  sendmail folder and then open sendmail.ini   file in code editor and here you will see smtp  underscore server this should be smtp.gmail.com and then here also we have  got smtp underscore port   there should be five eight seven  then we have got error dot log this file and then debug dot log  this is debug underscore log file   you can change the name for these files these will  log issues and errors in case email is not being   sent very helpful in debugging next we have got  auth underscore username this should be your gmail   username or email address and then earth  underscore password this should be your real   password for gmail account then we have got force  underscore sender you can use your email address   that that you will use here but this is optional  this is not necessary so i will not use it   and that's it change these settings and save these  files and that's it zam should be able to use your   gmail account to send email from localhost  when i used it at first time it didn't work   for security reasons gmail will reject this  configuration there is another step involved   this is our gmail account and this is google  we are logged into our gmail account turn on   unless secure app access from google  account settings let me say it again   google account settings and not gmail account  settings while you're logged into google or   gmail account go to google click add this  icon click here to manage your google account   go to security tab and then scroll down  find this less secure app access turn it on   now email will be sent successfully  let's try this by using wordpress   so this is our form let's refresh it now i have  configured xampp and i have used correct email   and password there for my gmail account so  here's the name let's use wsb email test   wsb add the data of server.com this is random  email it doesn't exist by the way subject   this is test subject this is test message so  now let's submit this email and as you can see   thank you for your message it has been  sent gmail refresh and we've got this email   this is test subject from wsp test wsb of  server.com subject this is test subject   and this is test message so we received this  email successfully and we submitted to this form   from wordpress by using localhost and  by using xampp and if email is not being   sent go to send mail folder in xampp check for  text files having names starting with the crash do you see these text files named as crash  one crash two and so on these files will give   you a clue about why email is not being  sent username and password not accepted   also check error.log file located here in  sandmail folder username and password not accepted   when i turned on less secure app success  in smtp email account from google settings   this error was gone smtp email account that  we are using is allowing less secure apps   that is why we should use a separate email  account for just this purpose to use smtp settings   so crash text files and error.log  will help you debug the issue   your smtp configuration should be correct  and it should send emails okay use this   configuration and next time does not matter the  text tag if it's using xampp emails will be sent   from localhost cool i hope it helped like share  subscribe and i will see you in the next video
Info
Channel: WebStylePress
Views: 4,239
Rating: undefined out of 5
Keywords: how to send mail from localhost, send email from localhost using xampp, use xampp to send mail, how to send mail from localhost xampp using gmail, how to send mail from localhost in php using xampp, how to send mail in php from localhost using xampp server, how to send mail in php using localhost, send email using php from localhost xampp, send email using php, how to send email using php, how to send mail using php from localhost, send email using php from localhost, php, Xampp
Id: 0aw3z0GdmUs
Channel Id: undefined
Length: 8min 11sec (491 seconds)
Published: Mon Nov 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.