Welcome Guest, Not a member yet? Register   Sign In
Sending email on WAMP
#1

[eluser]taurine[/eluser]
I keep getting this error:
Quote: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

In my php.ini, I have my SMTP server set to my ISP's SMTP server, and the word "localhost" is not mentioned at all in php.ini, or in my application, so I'm not sure why it says that or where it is getting it from. This has worked previously, so I don't understand why it now gives this error.

If I can't get email working in a local testing environment (WAMP), how else can I test emails?
#2

[eluser]taurine[/eluser]
I added this to my app right before the email->send()

ini_set ( "SMTP", "smtp.MyISP.net" );
ini_set ( "sendmail_from", "[email protected]" );

Now it works. I can't figure out why my php.ini settings are being ignored. I don't know if it is a Codeigniter problem or Wamp or ...? All I know is it was working last week.
#3

[eluser]JHackamack[/eluser]
Did you make sure you initialized your Email class correctly?

http://ellislab.com/codeigniter/user-gui...email.html

php.ini would work for command line php usage or procedural, but using the built in CodeIgniter email class you have to override it (either in a config document or each time you start the email class)




Theme © iAndrew 2016 - Forum software by © MyBB