EdFred
Taxi to Parking
<?php
include("Mail.php");
/* mail setup recipients, subject etc */
$recipients = "mailaddress";
$headers["From"] = "mailaddress";
$headers["To"] = "mailaddress";
$headers["Subject"] = "Test Message";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "localhost";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "username";
$smtpinfo["password"] = "password";
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
if (PEAR::isError($mail_object))
{
echo "<p>" . $mail_object->getMessage() . "</p>";
}
else
{
echo "<p>Message successfully sent (really new)!</p>";
}
echo '<br /><br/>';
print_r($mail_object);
echo '<br /><br/>';
echo $mail_object->getMessage();
?>
Ok, so I run this script (with appropriate mail/user/password) and it says the mail is sent successfully, but it doesn't send.
I am using Server2003 with IIS6.0 and Exchange Manager 6.5.6944.0
I have messed with all the relays, authentications, etc...
Any ideas on why it won't talk to the SMTP server and actually send the mail. Google has been of no help.
include("Mail.php");
/* mail setup recipients, subject etc */
$recipients = "mailaddress";
$headers["From"] = "mailaddress";
$headers["To"] = "mailaddress";
$headers["Subject"] = "Test Message";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "localhost";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "username";
$smtpinfo["password"] = "password";
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
if (PEAR::isError($mail_object))
{
echo "<p>" . $mail_object->getMessage() . "</p>";
}
else
{
echo "<p>Message successfully sent (really new)!</p>";
}
echo '<br /><br/>';
print_r($mail_object);
echo '<br /><br/>';
echo $mail_object->getMessage();
?>
Ok, so I run this script (with appropriate mail/user/password) and it says the mail is sent successfully, but it doesn't send.
I am using Server2003 with IIS6.0 and Exchange Manager 6.5.6944.0
I have messed with all the relays, authentications, etc...
Any ideas on why it won't talk to the SMTP server and actually send the mail. Google has been of no help.