|
Posted by Mike Wasilewski on 06/14/06 15:10
I am just setting up a win 2003 server running IIS6 , php, with pear
packages installed.
I am trying to get the Pear Mail package working but cannot get it to send a
message and it returns no error showing why.
here is the code I am using.
<?php
require_once("Mail.php");
$body = "Hello -Just testing. \n\n";
$to = 'me@myaddress.com';
$headers['subject'] = "Mail Test";
$headers['From'] = 'me@myaddress.com';
$params['host']="smtpout.secureserver.net";
$params['auth']='LOGIN';
$params['username']='me@myaddress.com';
$params['password']="mypass";
$params['port']=25;
print "Subject = ".$headers['subject']."<br>";
print "To = ".$to."<br>";
print "Body = ".$body."<br>";
$message = &Mail::factory('smtp',$params);
if (PEAR::isError($message)) { die($message->getMessage()); }
$message->send($to, $headers, $body);
if (PEAR::isError($message)) { die($message->getMessage()); }
?>
the page takes a while to load (45-60 seconds) and it shows the 3 lines from
print commands. It shows nothing else.
display_errors = on in php.ini and I do get error messages if I have errors
in coding (ie. include a file that does not exist).
This is a real stumper - any insight would be appreciated.
Mike
Navigation:
[Reply to this message]
|