All,
I am new at PHP. My client has PHP 4.3.10 installed on a Windows 2003 server. Currently it sends mail via smtp to a Linux server which works. When I change the php.ini file to a Windows 2003 the packets seem to get dropped. I did read a thread in the forum that tells a user to use swiftmailer or PHPMailer but I don’t understand why. I believe the current install uses PEAR and that is what the mail() function parses through? I could be way off base here but I am new.( be kind.) There is no resolve on the thread http://www.phpbuilder.com/board/showthread.php?t=10326422&page=1&pp=15&highlight=html+email+windows+2003 so I am not sure what happened. Oh, no email server exists exchange or otherwise on the Windows servers. SMTP is enabled on 192.168.0.8. Thanks in advance. P.S. I did not write the code. Your guidance is appreciated.
Current php.ini smtp settings on server 192.168.0.10.
[mail function]
; For Win32 only.
SMTP = 192.168.0.8
smtp_port = 25
; For Win32 only.
sendmail_from = admin@thisisthecompany.com
Here is some of the code on server 192.168.0.10. It opens an order page gets a SO number and sends it and the url to the recipients on Linux not Windows:
<?require_once('classes/order.class.php');?>
<?
if ($POST['submit'] == 'Submit') {
$order = new order();
$order->updateOrder($GET['order']);
$to = 'Lonnie <lonnie@thisisthecompany.com>, Woody <woody@thisisthecompany.com>, Kim <kim@thisisthecompany.com>, Vincent <vincent@someohtercompany.com>, Almen <almen@someothercompany.com>, Ron <ron@mydomain.com>';
$subject = $_GET['order'].' has been updated.';
$body = 'Please review '.$_GET['order'].' at the following link.<br><br>';
$body .= 'URL: <a href="http://corp.thisisthecompany.com/orders/edit.php?order='.$_GET['order'].'" target="_blank">http://thisisthecompany.com/orders</a>';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
// Additional headers
$headers .= 'To: Lonnie <lonnie@thisisthecompany.com>, Kim <kim@thisisthecompany.com>, Vincent <vincent@someothercompany.com>' . "\n";
$headers .= 'From: Kim <kim@thisisthecompany.com>' . "\n";
$headers .= 'Reply-To: Kim <kim@thisisthecompany.com>' . "\n";
mail($to, $subject, $body, $headers);
}
?>