Can't Send PHP Mail using Gmail

Avatar
  • Answered
I want to send email using php. But getting following error.

Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. v24sm10463826pfd.1 - gsmtp

kindly explain the steps to send email using php.
Avatar
Arn
Hello Dikshan817, Thanks for the question about sending PHP Mail using Gmail. According to the error you're seeing, it appears you're trying to send email using Gmail (not InMotion Hosting's email server) as indicated by "GSMTP". Providing coding support is beyond the scope of our support, but we can try to point you in the right direction. Please see this online forum post that discusses this issue in detail. If you have any further questions or comments, please let us know. Regards, Arnel C.