When I sent email from server then it gives me two error -
SMTP Error: Could not connect to SMTP host. Message could not be sent. Mailer Error: SMTP Er
First logout the your gmail account
then open this url use this yrl
click the continue button
Next change the port and SMTPsecure
$mail->SMTPSecure = "tls"; $mail->Port = 587;