Welcome Guest, Not a member yet? Register   Sign In
Dreamhost + Gmail SMTP + CI

[eluser]Vicente Russo[/eluser]
Helloo fellows, I need a little push here.

I`m trying to send and email with smtp, hosted on dreamhost. The thing is, I dont know where is the problem. I got an 404 error when I execute $this->email->send();

            $config = Array(
              'protocol' => 'smtp',
              'smtp_host' => 'ssl://smtp.gmail.com',
              'smtp_port' => 587,
              'smtp_user' => 'myuser@mydomain',
              'smtp_pass' => 'mypass'


            $this->email->from('myuser@mydomain', 'Vicente');
            $this->email->to('[email protected]');

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


            echo $this->email->print_debugger();

Checking the apache logs, I got "Premature end of script headers: index.php" error.

So what can it be? :S


When you say you get a 404 error, is this the CI 404 or the real 404?

[eluser]Vicente Russo[/eluser]
CI 404 !

Any redirects later on in the function?

[eluser]Vicente Russo[/eluser]
No redirects. The script ends echoing the print_debugger function.

But I added the following line, and it worked:


But I don`t know why the CI 404 error showed up. Misteries....

I came accross a thread earlier where chanign the newline character to \r\n fixed something as well (can't remember what though)

Theme © iAndrew 2016 - Forum software by © MyBB