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?

test.php
<?php
$to = "dubeystuts@gmail.com";
$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: akshyasharma02@gmail.com" . "\r\n";

/* Have also tried with and without the following two lines
ini_set(‘SMTP’, ’smtp.suddenlink.com’);
ini_set(’smtp_port’,25);
*//
mail ($to, $subject, $message, $headers);
?>

php.ini

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

SMTP=smtp.suddenlink.com.np
smtp_port=25

; For Win32 only.
;sendmail_from = me@example.com
sendmail_from = akshyasharma02@gmail.com

ISP provider is suddenlink.com. 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,
Stuti
dubeys
 
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:

http://jspr.tndy.me/2008/05/php-mail-and-osx-leopard/

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

http://theandystratton.com/2009/fix-php ... 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.
alfred3x
 
Posts: 29
Joined: 10. August 2006 19:00
Location: Toronto, ON, Canada

Previous

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 3 guests