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 9009219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:07:59+00:00 2026-06-16T02:07:59+00:00

$config = Array( ‘protocol’ => ‘smtp’, ‘smtp_host’ => ‘ssl://smtp.googlemail.com’, ‘smtp_port’ => 465, ‘smtp_user’ =>

  • 0
            $config = Array(
            'protocol' => 'smtp',
            'smtp_host' => 'ssl://smtp.googlemail.com',
            'smtp_port' => 465,
            'smtp_user' => 'xxx',
            'smtp_pass' => 'xxx',
            'mailtype'  => 'html', 
            'charset'   => 'iso-8859-1'
        );
        $this->load->library('email', $config);
        $this->email->set_newline("\r\n");

        $this->email->from('me@gmail.com','me');
        $this->email->to($this->input->post('email'));
        $this->email->subject("Confirm your account.");
        
        $message = '<p>Thank you for signing up!</p>';
        $message .= '<p><a href="';
        $message .= base_url();
        $message .= 'main/register_user';
        $message .= $key;
        $message .= '">Click here!</a>to sign up</p>';
        $this->email->message($message);

I’m following some Codeigniter tutorials from phpacademy on youtube. One of the tutorials has you email a unique key to a user so they can register. I’m attempting to send via a gmail account, using other questions and CI forums I’ve gotten to the code above, but I get the following errors:

Message: fsockopen() [function.fsockopen]: unable to connect to >ssl://smtp.googlemail.com:465 (Unable to find the socket transport "ssl" – did you forget >to enable it when you configured PHP?)

Filename: libraries/Email.php

—

Message: fwrite() expects parameter 1 to be resource, boolean given

Filename: libraries/Email.php

—

Message: fgets() expects parameter 1 to be resource, boolean given

Filename: libraries/Email.php

I’m lost as to the exact steps I need to take to set this up properly. Also, when I move this from local to an actual webhost will it still properly work with my gmail?

Thank you very much.

  • 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-16T02:08:00+00:00Added an answer on June 16, 2026 at 2:08 am

    Make sure that you have mod_ssl active on apache server

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

Sidebar

Related Questions

In config/routes.php <?php return array( 'account/profile/change_password' => 'users/account/change_password', ); I can access site.com/users/account/change_password and
I have a config YAML file with the following array: EMAILS: ['email1@example.com', 'email2@example.com', 'email3@example.com']
I've added # config/initializers/will_paginate_array_fix.rb require 'will_paginate/array' but still do not seem to be getting
I have set an array in my config file that I use global in
I have a config.php file that creates an array, something like $config = array(
I have the following code in config: <?php return array( 'di' => array( 'instance'
For example: A.php (the config file): <?php $a = array('name'=>'wine[$index][name]', 'value'=>'wine[$index][value]' ) ?> B.php:
I'm trying to install ibrowser for tinymce. Here's the config file: $cfg['ilibs'] = array
I have a config file that is a php array named config.php. return array(
I am storing multiple objects into a config array. for example like this class

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.