mail in Xampp OSX

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

Re: mail in Xampp OSX

Postby dubeys » 08. August 2010 04:14

I have got XAMPP installed on my MAC.

When I execute the code I get no errors but do not get an email in my account.

Following is the code in my .php and php.ini file. Any ideas / suggestions on why this does not work?

$to = "";
$subject = "test email";
$message = "test";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From:" . "\r\n";

/* Have also tried with and without the following two lines
ini_set(‘SMTP’, ’’);
mail ($to, $subject, $message, $headers);


[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from =
sendmail_from =

ISP provider is Do I need to ask ISP provider to enable emails from localhost? Do I need the email id on the ISP in sendmail_from field?

An early reply will be much appreciated. Many thanks for reading the post.

Best regards,
Posts: 1
Joined: 08. August 2010 04:06

Re: mail in Xampp OSX

Postby alfred3x » 12. December 2010 17:35

I got mail working on my XAMPP OSX install by following instructions in this post:

Another post pointing to the info (in case the first one goes offline) at: ... ard-update

It's not the php.ini file that needs attention. You need to get postfix running on OSX.

Doesn't XAMPP have an SMTP server built-in? Maybe that isn't included/enabled in the OSX version because OSX already has postfix.
Posts: 29
Joined: 10. August 2006 19:00
Location: Toronto, ON, Canada


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 7 guests