-1

I am trying to send mail from localhost.

I changed files php.ini and sendmail.ini and still not working. I am also turned on "Less secure app access" in Gmail account security

php.ini

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = [email protected]
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header=Off

sendmail.ini

smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
[email protected]
auth_password=my-email-password
[email protected]

3
  • 1
    "still not working" - what isn't working exactly? Are you seeing an error message? Commented May 2, 2019 at 19:50
  • Don’t tag your questions with unrelated tags like PHPMailer and phpmyadmin. Commented May 2, 2019 at 19:58
  • Possible duplicate of Send email from localhost running XAMMP in PHP using GMAIL mail server Commented May 2, 2019 at 21:12

1 Answer 1

2

You also need to allow less secure apps from your google account.

  1. Go to your Google Account.
  2. On the left navigation panel, click Security.
  3. On the bottom of the page, in the Less secure app access panel, click Turn on access.

https://support.google.com/accounts/answer/6010255?hl=en

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.