Welcome Guest, Not a member yet? Register   Sign In
Porblem with smtp email
#1

[eluser]Unknown[/eluser]
hi,

I'm having problems with the Gmail SMTP setting. When sending emails I receive the following error.

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: crypto

Filename: libraries/Email.php

Line Number: 1707

Backtrace:

File: E:\wamp\www\#\#\index.php
Line: 251
Function: require_once

Fatal error: Maximum Execution time on 300 seconds exeeded in \codeigniter\system\libraries\Email.php on line 1830


Here is configuration that I'm useing.

Code:
$config  = array(
                   'protocol' => 'smtp',
                    'smtp_host' => 'smtp.gmail.com',
                    'smtp_user' => '[email protected]',
                    'smtp_pass' => '********',
                    'smtp_port' => '465',
                    'smtp_crypto' => 'ssl',
                    'newline' => '\r\n',
                    'protocol' => 'smtp',
                    
                );
            
                $this->load->library("email", $config);
                
                $this->email->from('[email protected]');
                $this->email->to('[email protected]');
                $this->email->subject('test');
                $this->email->message('Hello');
                $this->email->send();

Outlook and PHPMailer works fine with the above settings.

Pls help me.
#2

[eluser]CroNiX[/eluser]
not sure if it matters but you have protocol entered 2x, and also a trailing comma in your $config array.

Also, see this thread.




Theme © iAndrew 2016 - Forum software by © MyBB