$params['auth'] = "TRUE";
$params['username'] = "ckline"; $params['password'] = "mypassword";
Are you sure you need to authenticate on the smtp server - this is very rare... - just remove those lines and it will probably work..
Regards
Alan
$message =& Mail::factory('smtp', $params);
$result = $message->send($to, $headers, $body);
echo "<pre>";
var_dump($result);
echo "</pre>";
?>
The results of the var_dump() are this:
object(pear_error)(8) {
["error_message_prefix"]=>
string(0) ""
["mode"]=>
int(1)
["level"]=>
int(1024)
["code"]=>
NULL
["message"]=>
string(37) "unable to authenticate to smtp server"
["userinfo"]=>
NULL
["backtrace"]=>
array(2) {
[0]=>
array(6) {
["file"]=>
string(32) "/usr/local/lib/php/Mail/smtp.php"
["line"]=>
int(147)
["function"]=>
string(10) "pear_error"
["class"]=>
string(10) "pear_error"
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
string(37) "unable to authenticate to smtp server"
}
}
[1]=>
array(6) {
["file"]=>
string(69) "/contact/send.php"
["line"]=>
int(13)
["function"]=>
string(4) "send"
["class"]=>
string(9) "mail_smtp"
["type"]=>
string(2) "->"
["args"]=>
array(3) {
[0]=>
string(25) "ckline@smtp.mymailserver.net"
[1]=>
array(2) {
["From"]=>
string(26) "website@smtp.mymailserver.net"
["Subject"]=>
string(7) "Testing"
}
[2]=>
string(13) "hey it worked"
}
}
}
["callback"]=>
NULL
}
--
Can you help out?
Need Consulting Services or Know of a Job?
http://www.akbkhome.com