Avatar of jerseyguy0
jerseyguy0
 asked on

smtp sendmail using google mail for a domain in php

// Sets the SMTP server to send emails
$Variable->setSMTP("smtpserver.host.com");


how do I change this php code to smtp sendmail using google mail for a domain



my domain name is luxuryhouses.com
and I am using google as domain email
Email ServersEmail ProtocolsPHP

Avatar of undefined
Last Comment
hankknight

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
hankknight

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jerseyguy0

ASKER
i am having trouble sending emails when using localhost

but when i use my domain, I can send emails

using
smtp.gmail.com


why doesnt this work for localhost
hankknight

You said that when you use your domain, I can send emails using smtp.gmail.com.
Does that mean your original question was answered?

There are many possibilities for why you cannot send mail via localhost but we don't have enough information from you to diagnose this.  

I suggest that you open a new question about your troubles with localhost because this question is about smtp for gmail.

Best luck,
Hank
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes