Home > Software design >  How solve this error ( mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first.
How solve this error ( mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first.

Time:10-28

I has this error when try register

mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. k1sm2231247pjj.54 - gsmtp

my php.ini is enter image description here

my env is


MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=ssl


I dont know why this happen can someone explain me

CodePudding user response:

You're working with SSL so, check your PHP installation to make sure you can use that protocol, check if your PHP supports it.
If it does, try changing your .env, changing the line MAIL_HOST=smtp.googlemail.com to MAIL_HOST=smtp.gmail.com.
If this doesn't solve your problem, try modifying SMTP=ssl in your php.ini to SMTP=ssl://smtp.gmail.com.

  • Related