Welcome Guest, Not a member yet? Register   Sign In
Getting email to work with bluehost
#1

[eluser]Unknown[/eluser]
I've searched around for this topic and I've found people saying they have the same problem, but no clear solution.

I have sites hosted on bluehost and I wish to set up email, etc. Right now I am using CI 1.7 because I could find solid tutorials for it.

so

function index() {
//view options in user guide.
$config=Array(
'protocol'=>'smtp',
'smtp_host'=>'*I've tried gmail, and not sure what I need to use bluehost',
'smtp_port'=>26, (or whatever)
'smtp_timeout' => '7',
'smtp_user'=>'xxx',
'smtp_pass'=>'xxx',
'mailtype'=>'html',

);

//pass config as second argument
$this->load->library('email', $config);


//must do this, must put \r\n in double quotes.

$this->email->set_newline("\r\n");
$this->email->from('[email protected]');
$this->email->to('[email protected]');
$this->email->subject('this is an email test');
$this->email->message('sample message');

if ($this->email->send())
{
echo 'It worked yo!';
}
else {
show_error($this->email->print_debugger());
}
}

This should be really straightforward but I keep getting errors:

A PHP Error was encountered

Severity: Warning

Message: fsockopen() [function.fsockopen]: unable to connect to smtp://box###.bluehost.com:26 (Unable to find the socket transport "smtp" - did you forget to enable it when you configured PHP?) (YES, I replaced the ### with actual numbers above).

Filename: libraries/Email.php

Line Number: 1652


when I tried gmail I got this:
Severity: Warning

Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out)

Filename: libraries/Email.php

Line Number: 1652


the debug began with:
The following SMTP error was encountered: 110 Connection timed out
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:

from:
The following SMTP error was encountered:
Unable to send data: RCPT TO:
to:
The following SMTP error was encountered:
Unable to send data: DATA
data:

-----

So at this point I'm stuck. I'm somewhat new to this and really lost.


Messages In This Thread
Getting email to work with bluehost - by El Forum - 10-19-2011, 12:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB