Send Email From localhost WordPress | How to Send Mail from localhost [Updated]
How to send mail from localhost? How to send emails from localhost using XAMPP? Often we work with localhost before site migration to live server. Let’s say you are working with wordpress or woocommerce and you have to check emails and email templates and stuff, but you are at localhost and localhost needs configuration to send emails. I have created a tutorial earlier, where I demonstrated that how can we send emails from wordpress while we are working at localhost. That involved SMTP. For SMTP we used gmail account. But now the “Less Secure App Access” setting is no longer available for gmail. Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
Emails are not being sent from localhost in my PC. We used SMTP from Gmail email address. To get a different SMTP we just need a different email address. So first we will get the SMTP from our own email address and then we will fix XAMPP SMTP configuration.
How to get localhost SMTP settings for email? SMTP is used to setup email for local client. Using SMTP you can receive emails in your PC – in email client. You don’t have to login to email provider in web browser to check your emails. SMTP is also used to send emails securely and to avoid email to land in spam folder.
Like if I have a website, it will send emails to customers and viewers, right? If I want to make sure for email to land in inbox and not in junk folder or spam folder, i will have to use SMTP, to ensure reliable email delivery. SMPT is important.
If you have a website, then you have email address also. You will have to check email settings to find out SMTP information. I have Cpanel, so I will login to cpanel, go to email accounts from email section, click ‘check email’ button for required email address, and at this page that asks you to select email client to view email, look for ‘Other Webmail Features’. There we have ‘configure mail client’ and ‘manual smtp settings’ for this email address.
For SMTP we need:
SMTP mail server: (outgoing server) mail.yourdomainname.com
You will need email address that you already know
Email password that you already know
and
SMTP Port that is shown there
These are required SMTP settings for your email address.
We can use these smtp settings in email client or in XAMPP SMTP settings or anywhere, where SMTP information is needed.
Now that we have got the SMTP settings. Let’s configure SMTP in XAMPP.
– Go to *XAMPP* Installation Directory
– Go to *php* folder
– Open *php.ini* file in code editor
Search for *SMTP*
Use updated SMTP settings
SMTP=mail.domainname.com
smtp_port=000
sendmail_from=YourEmailAddress@yourdomain.com
sendmail_path=””C:xamppsendmailsendmail.exe” -t”
Change drive letter to where you have installed XAMPP. In my case I have installed XAMPP in C drive in PC. Change email address in above config also.
Then
– Go to *sendmail* folder in XAMPP
– Open *sendmail.ini* file in code editor
Search SMTP
Change values for following:
smtp_server=smtp.yourdomainname.com
smtp_port=000
auth_username=YourEmailAddress@YourDomainName.com
auth_password=PASSWORD
and that’s it.
Restart APACHE and mySQL services for a good measure, from XAMPP control panel.
After doing these settings for XAMPP, email worked for us again.
Just use a separate SMTP from different email address if you are unable to use SMTP from gmail.
If you have web hosting, use your own SMTP for your email address.
If you are working for a client, ask SMTP settings from his web host,
if you are at job, ask manager or boss to provide client’s SMTP details.
Just use those SMTP settings in XAMPP and email will start to deliver from localhost.
– Send Email using XAMPP | Send Email from localhost by using WordPress
If you are new to the channel, subscribe to learn more about web development, web application development, editing wordpress source code, how to create a website using wordpress, developing landing page in wordpress, working with child theme wordpress, custom wordpress theme development, wordpress plugin development, how to build a website with wordpress, create website with wordpress and related web development areas.
Thank You!
👍 LIKE VIDEO
👊 SUBSCRIBE
🔔 PRESS BELL ICON
✍️ COMMENT
⚡Channel: https://www.youtube.com/webstylepress
⚡Website: https://www.webstylepress.com
⚡FaceBook: https://www.facebook.com/webstylepress
⚡Twitter: https://twitter.com/webstylepress
⚡GitHub: https://github.com/webstylepress
#WebStylePress #smtp #localhost #wordpress #emails #xampp
by WebStylePress
linux smtp server
Great job, thank you.
Is this work in wamp
Where i can find cpanel?
Nice tutorial, but there is one problem for me… How do I use SMTP email if I have multiple websites in one xamp (localhost)?