Welcome Guest, Not a member yet? Register   Sign In
Email error (can't send)
#1

[eluser]Noor[/eluser]
Help please, I can't send email.

A PHP Error was encountered

Severity: Warning

Message: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

Filename: libraries/Email.php

Line Number: 1519
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

From: "Your Name"
Return-Path:
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
=?utf-8?Q?Email_Test?=
Testing the email class.

HELP...
#2

[eluser]MurkeyDismal[/eluser]
It looks to me as if you haven't set the from or to fields, I would also check your server details, [email protected] should be your real email address.
#3

[eluser]Jelmer[/eluser]
Actually, I think the part below is the important part - and it's quite clear on what the problem is:
Quote:Severity: Warning

Message: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set()
#4

[eluser]Noor[/eluser]
Hi Jelmer, do you know how to fix it.
I use Wamp Server and I didn't do anything with the server config.
Help me please...
#5

[eluser]mddd[/eluser]
Noor,
You have to separate the different services. If you send mail from php (through CodeIgniter or through the regular mail() function), php will contact a smtp server to do the actual sending. If you don't specify, the php/webserver process will assume that there is an smtp server running on the same machine.
If you have not installed one, that will not work.

A solution is to point php to another smtp server. It could be another web server you own. Or the smtp server of your internet provider. Php will send the email through there and you should be fine.

Of course, check that the server will accept mail from your ip address. If you are on the network of that ISP it will generally be no problem.
#6

[eluser]Noor[/eluser]
Thank you guys.




Theme © iAndrew 2016 - Forum software by © MyBB