Christopher J. Mackie wrote:

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.

Well, there might be errors that you aren't seeing. I have modified your code, run it and see if you get any new information :



<?php
error_reporting(E_ALL);
require_once('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);
if (PEAR::isError($mail_object)) { die($mail_object->getMessage()); }
$mail_object->send($recipients, $headers, $body);
if (PEAR::isError($mail_object)) { die($mail_object->getMessage()); }

?>


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



Reply via email to