I'm following the PEAR docs to use Mail/SMTP. Below is the code I use,
swiped directly from the docs--I've changed the authorization data to
protect privacy, but otherwise it's identical (and email sent from a client
on this same machine using the same settings works fine).  I'm running PHP
4.3.6 ISAPI on Win2k3 Server, IIS6.0.

No errors are generated back to me, but the messages aren't going through.
I can't see the smtp server logs, so I don't know what's failing.

I'm new to PHP:  what am I missing? Is there a way that I can examine on my
end the errors that are presumably being generated at the SMTP server?

Tx, --CJ

<?php
include('Mail.php');

$recipients = '[EMAIL PROTECTED]';
$headers['From'] = '[EMAIL PROTECTED]';
$headers['To'] = '[EMAIL PROTECTED]';
$headers['Subject'] = 'Test message';
$body = 'Test message';

$params['host'] = 'smtpserver.princeton.edu';
$params['auth'] = TRUE;
$params['username'] = 'cjm';
$params['password'] = 'mypass';
$params['port'] = '25';

$mail_object =& Mail::factory('smtp', $params);
$mail_object->send($recipients, $headers, $body);

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to