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

  • SEARCH
  • Home
  • 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 8250829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:02:04+00:00 2026-06-08T00:02:04+00:00

I am trying to send email with gmail account in Zend framework. This is

  • 0

I am trying to send email with gmail account in Zend framework. This is what I got so far:

$mailTransport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', array(
    'auth'     => 'login',
    'username' => 'myaddress@gmail.com',
    'password' => 'password',
    'port'     => '587',
    'ssl'      => 'tls',
));
Zend_Mail::setDefaultTransport($mailTransport);
$mail = new Zend_Mail();
$mail->setBodyText('This is the text of the mail.');
$mail->setFrom('myaddress@gmail.com', 'sender');
$mail->addTo('reciever@gmail.com', 'receiver');
$mail->setSubject('TestSubject');
$mail->send();

With this code, I get the following error:

Message: Unable to connect via TLS

How can I fix it? I have a default XAMPP installation setup with no SMTP setup in php.ini.

  • 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-06-08T00:02:06+00:00Added an answer on June 8, 2026 at 12:02 am

    I found the solution:
    I had a default php.ini setting setup by xampp. In order to connect via TLS, we require OpenSSL be enabled. To enable OpenSSL, first find php_openssl.dll file inside xampp\php\ext folder. If you find this file, then open php.ini file and add the following line to it:

    extension=php_openssl.dll
    

    That’s all to enable openssl in xampp. this enabled to send email

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

Sidebar

Related Questions

am trying to send an email using the following code $this->load->library('email', $config); $this->email->from('leena.nasir552@gmail.com'); $this->email->to('leena.nasir@morgan.com');
Hey guys, I am trying to send email using my gmail account, and I'm
I'm trying to send an html email to a gmail account, but for some
I am trying to send an email via GMail's SMTP server from a PHP
im trying to send email with mail plugin in grails with the gmail account.
Well I'm trying to send a HTML email using gmail smtp from CI, and
I am trying to use the Zend Framework to send mail with Gmail, but
I'm trying to send an email using the GMail SMTP server. I have the
I´m trying to send an email through gmail using this code: MailMessage msg =
I am trying to send an e-mail using gmail account (Delphi 7, Indy 10)

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.