PHP 5.3.0 won't send mail on Leopard

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

PHP 5.3.0 won't send mail on Leopard

Postby Ron Newman » 24. August 2009 02:55

I installed XAMPP 1.7.2a on Leopard, and executed the following PHP script, both from the command line and via HTTP:
Code: Select all
<?php

ini_set('display_errors', true);
error_reporting(E_ALL);

$result = mail("rnewman@thecia.net",
    "This is a test of mail from PHP " . PHP_VERSION,
   "Test subject for mail from PHP " . PHP_VERSION);
print("This is PHP " . PHP_VERSION . ".\n");
print("Result of calling mail is $result\n");

?>


The script printed "Result of calling mail is 1", indicating success, and it displayed no error message. However, it never actually sent any mail.
Help?
Ron Newman
 
Posts: 15
Joined: 24. June 2009 05:38

Re: PHP 5.3.0 won't send mail on Leopard

Postby caltuna » 24. August 2009 03:36

You will not be able to send mail out of your Mac unless you install/configue postfix (or something like that.) I don't know of any way to "talk" to AppleMail.app via PHP. There are a number of websites that have tutorials on how to set up mail from PHP on a Mac so google for them. There may be an answer in this forum so search for that as well.
caltuna
 
Posts: 111
Joined: 05. May 2009 16:35


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 1 guest