Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 798475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:58:37+00:00 2026-05-14T22:58:37+00:00

I am making use of PHPMailer to send mail through GMail. The code I

  • 0

I am making use of PHPMailer to send mail through GMail. The code I use is straight from a tutorial and it works perfectly on my laptop. However, testing this on a Windows 2003 Server – it seems to always return an SMPT error:

SMTP Error: Could not connect to SMTP
host. Mailer Error: SMTP Error: Could
not connect to SMTP host.

Here is the settings I use in PHPMailer:

include("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // use ssl
$mail->Host = "smtp.gmail.com"; // GMAIL's SMTP server
$mail->Port = 465; // SMTP port used by GMAIL server

Can I say with confidence that this isn’t a port issue, since I am connecting to another server on port 465 and it is sending mail. If not, please explain.

How can I resolve this issue?

Thanks all for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:58:37+00:00Added an answer on May 14, 2026 at 10:58 pm

    First thing notice off-hand: Gmail uses TLS. Don’t know if having SSL instead of TLS will make much of a difference but SSL is the predecessor to TLS.

    I recommend checking out also, its phpmailer customized for using gmail. PHPGMailer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making extensive use of boost:shared_ptr in my code. In fact, most of
I'm making use of ZeroMQ from .NET and got stuck trying to fix a
I was trying to create a MSI package from scratch by making use of
I am making use of AJAX on my site and I would like to
I'm using Strawberry Perl which includes MinGW's GCC, I'm also making use of the
I am developing a cocoa application that will be making heavy use of both
We use ASP.NET, C# When making an update to one of our websites, we
I'm making a small quiz-application in Flash (and ActionScript 3). Decided to use the
In general I'd like to understand which templates to use when, when I'm making
By making use of the remote feature in vim, is it possible to reuse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.