0% found this document useful (0 votes)
30 views1 page

Configure Email Di Hosting

Uploaded by

La Tahzan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Configure Email Di Hosting

Uploaded by

La Tahzan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

If you getting any error alert like below when you run this on a live host server.

There can be multiple reasons for that. If you are running this on a live host, you
have to use the necessary settings in your host service. Because the settings of
the host services are different from one to another. Read this.

"SMTP Error: Could not authenticate."


"SMTP Error: Could Not Connect to SMTP Host"

If you get these errors when you try on a live host. This might be helpful.

In your host > go to cpanel > Email Accounts > Webmail > Configure Mail Client

Then you can find Secure SSL/TLS Settings (Recommended).


From that settings use settings below.

● Username (Web Email Address)


● Password (Web email Password)
● Outgoing Server
Host can be yourdomain.com / mail.yourdomain.com
SMTP Port: Can be 465/587

*you can use a Gmail or any email address to receive emails.

After you change codings it can be look like below.

$mail->isSMTP();
$mail->Host = 'yourdomain.com'; // Can be mail.yourdomain.com
$mail->SMTPAuth = true;
$mail->Username = '[email protected]'; // Your host email account which you want
to use as SMTP server
$mail->Password = 'host email password'; // host email account password
$mail->SMTPSecure = 'ssl'; // Can be tls
$mail->Port = 465; // Can be 587

$mail->setFrom('[email protected]'); // Your host email account which you used


as SMTP server
$mail->addAddress('[email protected]'); // Email Address where you want to
receive emails (You can use any other email address to receive emails)

You might also like