Pear mail on IIS6 server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Wasilewski

    Pear mail on IIS6 server

    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("M ail.php");
    $body = "Hello -Just testing. \n\n";

    $to = 'me@myaddress.c om';
    $headers['subject'] = "Mail Test";
    $headers['From'] = 'me@myaddress.c om';
    $params['host']="smtpout.secur eserver.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."<b r>";
    $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


Working...