Ok yesterday I spent all day getting the pear mail function to work. Now today its giving me errors... loads of them. The first is:
(2048) Non-static method Mail::factory() should not be called statically, assuming $this from incompatible context
Line 152 of file C:\wamp\www\application\controllers\user.php
The code calling it is:
private function send($msg) {
$params = array();
$params['host'] = SMTP_HOST;
$params['port'] = SMTP_PORT;
$params['auth'] = TRUE;
$params['username'] = SMTP_USER;
$params['password'] = SMTP_PASS;
$mail =& Mail::factory('smtp',$params);
$headers = array();
$headers['From'] = SMTP_USER;
$headers['Reply-to'] = SMTP_REPLY;
$headers['To'] = $msg['To'];
$headers['Subject'] = $msg['Subject'];
if( $mail->send($msg['To'],$headers,$msg['body']) ) return TRUE;
return FALSE;
} // End: send()
What's really confusing is it worked yesterday to all 3 of my emails addresses. And now all of a sudden getting this and more errors (but I think the other errors are cascaded from this). The SMTP_ constants are defined in the site config.