Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

php Mail() headers problems in OS X server 10.5



Dear all,
When using the mail() function in php from a web page on the OSX 10.5 server (see example code below), only the first header is processed but the other headers are added to the body of the email and are not processed as header for the email.
The same exact code works just fine on the OS X10.4.11 server.


It seems to be a postfix related issue on how to handle the return characters because it works fine if I replace the \r\n by \n but then may not work right on 10.4.

Does anyone know if it this related with the latest postfix version? A change on how OS X deals with carriage returns? or a php issue?
If a postfix issue, is there something I can change in the main.cf configuration file to make it work without having to find and fix all scripts that uses that mail function.


The OS X 10.5 server is running PHP 5.2.5/ Apache 2.2.8 / Postfix 2.4.3
The OS X 10.4.11 server is running PHP 5.0.4/ Apache 1.3.41 / Postfix 2.1.5



<? $emailfrom= 'email@hidden; $emailto= 'email@hidden'; $emailcc= 'email@hidden;'; $newsubj='test from web site'; $message="This is a test sent a web site. \nbruno"; $headersemail .= "From: $emailfrom\r\n"; $headersemail .= "Reply-To: $emailfrom\r\n"; $headersemail .= "Cc: $emailcc\r\n"; mail("$emailto", "$newsubj", "$message ",$headersemail); ?>

Thanks for your help.

Bruno



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.