Mail Function In Php Not Working In Localhost Xampp

Mail Function In Php Not Working In Localhost Xampp? [Solved]

If your mail function in PHP not working in Localhost XAMPP, then carry out the simple and quick troubleshooting instructions given below.Basically, to send an e-mail message from your mail account like Gmail using the localhost XAMPP server, you need to enable the IMAP or POP3 access on your account. Not only this access, but you also need to enable the Less secure apps option on your account. If the mail function in PHP is not working in Localhost XAMPP even after enabling the above two options, then you need to check whether the incoming and outgoing server ports are configured correctly. The below section explains how to enable the IMAP or POP3 access and the Less secure apps option on your Gmail account.

Enabling IMAP or POP3

  • Step 1: Sign in to your Gmail account from your computer’s web page.
  • Step 2: Go to the Settings menu of your account.
  • Step 3: Click on the Forwarding and POP/IMAP option.
  • Step 4: Locate the POP3 or IMAP setting and check whether there is a checkmark beside it.
  • Step 5: If not, click to enable the checkbox.

Enabling Less Secure apps

This option allows third-party mail clients like Outlook to access your Gmail account without any error.

  • Step 1: On the main screen of your account, click on the My Account menu.
  • Step 2: Choose the Sign-in & security option followed by Connected apps & sites.
  • Step 3: Locate the Allow Less secure apps option and select it.

Now, check if the mail function in PHP is working in localhost XAMPP. If not, check whether your Gmail account’s incoming and outgoing server settings and ports are configured correctly.If you encounter this issue while using TCP in port 587, then use Port 465. To get remote assistance in resolving Mail Function In Php Not Working In Localhost Xampp issue, click the Call us button.

Related Searches

How To Encrypt Email?

How To Encrypt Email?

In order to prevent third parties from reading your mail content, email encryption is done, which is basically digitizing the information within. 

How To Stop Spam Emails?

How To Stop Spam Emails?

There are not many ways to prevent spam from piling up in your Inbox. Here’s how you can filter out most of them.

Fix AT&T Email Error

Fix AT&T Email Error 0x800CCC0F

AT&T Email error 0x800CCC0F occurs when mails are not being sent or received through AT&T services. Due to the technical glitches causing it, many email functions are disabled. The computer’s Operating System might get frozen.

How To Delete All Emails In Gmail?

How To Delete All Emails In Gmail?

Open the Gmail app.Select the inbox tab you want to delete.You’ll find the Empty Box button over the Compose button.