SMTP Error Using PHPMailer

I get the message "SMTP Error: Could not connect to the SMTP host." when trying to send mail using GMAIL SMTP and PHPMailer ..

The code works fine in the local environment, but gets an error on the livehost (bluehost) server. Please, help

+4
source share
1 answer

Bluehost does not allow SMTP gmail connections .

Quote:

According to bluehost, you cannot send emails via SMTP connections from web applications hosted on bluehost. They only allow sending through their SMTP servers.

The work around is that I set up an email account with Bluehost in the same way as the email address I use with Google Apps. Then I changed the code in Magento to send using SMTP servers using bluehosts:

For instance:

Outgoing server: (SSL) boxnumber.bluehost.com (server requires authentication) Supported incoming message protocols:

* POP3: port 110 * POP3S (SSL/TLS): port 995 * IMAP: port 143 * IMAPS (SSL/TLS): port 993 

Supported outgoing mail protocols:

 * SMTP: port 26 * SMTPS (SSL/TLS): port 465 

And it works, it sends emails to clients with the correct email address sent from the bluehosts local SMTP servers, so when clients reply to the email address, it will go to my Google applications mailbox.

+11
source

All Articles