Welcome Guest, Not a member yet? Register   Sign In
Weird email sending problem
#1

[eluser]vokic[/eluser]
First of all just to say Hi to everybody Smile

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? Smile

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('root@localhost', '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 Smile

Thanx in advance...
#2

[eluser]Iksander[/eluser]
Well, if it is on your localhost, install a an SMTP server.
#3

[eluser]vokic[/eluser]
Already done that... But problem still persist..

Solved it just by using regular mail function which will be replaced when app goes live on server... Hopefully there will be no problems with CI like on localhost...

If problem stays, regular mail function will be left..

Thanx for the reply...




Theme © iAndrew 2016 - Forum software by © MyBB