Welcome Guest, Not a member yet? Register   Sign In
How use the gmail SMTP for sending email
#11

[eluser]hansfahlen[/eluser]
[quote author="Cristian Gilè" date="1294338587"]It seems a known issue that has been fixed after setting
Code:
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";
[/quote]

Hi, im having the same problem(:\wamp\www\ci\system\libraries\Email.php on line 1818). Where shall i put $config['newline'] = "\r\n";
$config['crlf'] = "\r\n";?

my code looks like this:

<?php

class Email extends Controller
{


function index()
{

$this->load->library('email');



$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.gmail.com';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = '******';
$config['smtp_port'] = 465;
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";


$this->email->initialize($config);
$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->cc('');
$this->email->bcc('');

$this->email->subject('Email Test');
$this->email->message('Testing the email class.');

if($this->email->send())
{
echo 'Your email was sent, fool.';
}

else
{
show_error($this->email->print_debugger());
}
}
}

?>
#12

[eluser]cideveloper[/eluser]
This is what I have in my email.php. I have tried all the other variations and this one has always worked.

Code:
$config['protocol']="smtp";
$config['smtp_host']="ssl://smtp.googlemail.com";
$config['smtp_port']="465";
$config['smtp_timeout']="30";
$config['smtp_user']="[email protected]";
$config['smtp_pass']="p4ssw0rd";
$config['charset']="utf-8";
$config['newline']="\r\n";

I have never even seen

Code:
$config['crlf'] = "\r\n";
#13

[eluser]Cristian Gilè[/eluser]
@programmer: crlf is valid option. In the email library there is a set_crlf called during the inizialization.

Cristian Gilè
#14

[eluser]cideveloper[/eluser]
[quote author="Cristian Gilè" date="1294643302"]@programmer: crlf is valid option. In the email library there is a set_crlf called during the inizialization.

Cristian Gilè[/quote]

Oh geez...my bad. Completely didn't look at that.
#15

[eluser]hansfahlen[/eluser]
yeah but where shall i put :
$config[‘newline’] = “\r\n”;
$config[‘crlf’] = “\r\n”;
then?

And does it work with Wamp-server




Theme © iAndrew 2016 - Forum software by © MyBB