environment: Mac G4, Mac OS X Server 10.2.x,
My php code is supposed to auto generate a confirmation email to customers in response to some action they have taken.
The problem is, it will only send the confirmation email to users who have an account on my Mac OS X Server; it rejects messages to customers in other domains.
The mail server is configured to reject open relays, but users can send email to the outside world by authenticating. This works fine using an email client such as Outlook Express.
Since the email message is generated on the server (localhost), by a "user" with an account on the server, I assumed it should go.
I suspect that I need to authenticate in the php code, but I can find no information on how to do that.
php Code snippit:
$to = "$sender_email"; //to the customer
$subject = "Gallery Listing";
$mailheaders = "From: Trader's Bend Photo Gallery <gallery@tradersbend.com> \n";
$mailheaders .="Reply-To: [email]gallery@tradersbend.com[/email]\n\n";
mail($to, $subject, $msg, $mailheaders);
The above works fine as long as the $to address is in the tradersbend.com domain, but the it is rejected if the customer is in another domain.
gallery@tradersbend.com is the sender and has an account on the server, but is not being recognized here.
What am I missing...
Thanks,
Robert <robert@tradersbend.com>