stufow - 2006-08-14 04:43:03

Hi

I have built a flexi/leave system using PHP and MySQL which is running on a Windows 2003 server (IIS6) in an internal

internet. I have been asked to get the system to send emails to managers when certain parts have been completed by members of staff.

After a bit of digging about I found the mail() function. However all examples of code I have found are for external emails.

Any suggestions on how I would get this working in an intranet. We use MS Exchange 2003.

I did try a simple PHP script running on my PC that called the function :

Code::

<?php # Mail

$mailaddress = 'stuart';
$subject = 'test';
$msg = 'This is a test';

mail($mailaddress,$subject,$msg);

echo'<p>Mail Sent</p>';

?>

It just complains about the SMTP :
Warning: mail(): Failed to connect to mailserver at "1itdeptxp" port 25, verify your "SMTP" and "smtp_port" setting in


What am I doing wrong? And is it possible to do this within an intranet?

Thanks