El Forum
07-17-2007, 09:08 PM
[eluser]vokic[/eluser]
First of all just to say Hi to everybody
Now to the problem... I can't send emails with CI Email class through smtp from localhost...
Error message when using 'mail' option:
Error message when using 'smtp' option:
So what should I do then?
Just to say that regular mail function does the job without problems. That is the weird part because, as I understood it, 'mail' option from Email class uses the same function.
php.ini is good (smtp and user are good)
Here is the code (just ordinary code) :
I've checked the forum a little... Maybe because of this:
My coleague managed to sort out this by providing the smtp_user and smtp_pass, but I cannot go with that because i'm part of local network behind ISP which smtp I am using...
That smtp works cause I get response from it...
Complicated as you can see
Thanx in advance...
First of all just to say Hi to everybody

Now to the problem... I can't send emails with CI Email class through smtp from localhost...
Error message when using 'mail' option:
Quote:SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
Error message when using 'smtp' option:
Quote:451 See http://pobox.com/~djb/docs/smtplf.html.
The following SMTP error was encountered: 451 See http://pobox.com/~djb/docs/smtplf.html.
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
So what should I do then?

Just to say that regular mail function does the job without problems. That is the weird part because, as I understood it, 'mail' option from Email class uses the same function.
php.ini is good (smtp and user are good)
Here is the code (just ordinary code) :
Code:
$this->email->from('[email protected]', 'Root');
$this->email->to('[email protected]');
$this->email->subject('Mail subject');
$this->email->message('Some text here...');
$result = $this->email->send();
echo $this->email->print_debugger();
I've checked the forum a little... Maybe because of this:
Quote:Typically you can only send email using SMTP on the same server where your CI installation is located. If you are trying to access a remote SMTP server it’s not going to work, since relaying is usually disallowed for secuity reasons.
My coleague managed to sort out this by providing the smtp_user and smtp_pass, but I cannot go with that because i'm part of local network behind ISP which smtp I am using...
That smtp works cause I get response from it...
Complicated as you can see

Thanx in advance...