I am using the XAMPP stack for web development. I followed this tutorial to configure my machine to send mail from the local host. This worked flawlessly under OS X Mavericks, but Yosemite seems to have broken it.
I tried all the troubleshooting methods for linked mail to no avail and created this small PHP file to test them. This prints false to my machine.
<?php error_reporting(-1); ini_set('display_errors', 'On'); $headers = array("From: from@example.com ", "Reply-To: replyto@example.com ", "X-Mailer: PHP/" . PHP_VERSION ); $headers = implode("\r\n", $headers); $didhappen = mail(' myemail@email.com ', 'test', 'test', $headers); if($didhappen) { echo 'true'; } else { echo 'false'; } ?>
I can still send mail using the terminal, for example, if I run the mail example@gmail.com command, my computer will send an email from my personal gmail address (the one I configured for localhost) and it will appear in the @gmail example. com Inbox. However, whenever I use the mail function in PHP, letters never arrive and may never be sent.
I think the problem is sendmail, it generated some crash reports like this ...
10/19/14 6:42:09.407 PM ReportCrash[13377]: Saved crash report for sendmail[13376] version ??? to /Library/Logs/DiagnosticReports/sendmail_2014-10-19-184209_Trevors-MacBook-Pro.crash
Any ideas on what Yosemite could break? Or did someone else have this problem?
source share