Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-18-2003, 11:03 PM   #1
LunaC
Prospect
 
Join Date: Nov 2003
Posts: 6
Panther PHP & Sending Mail

Ok. I soooooo don't get how to set up sendmail on my computer. Of course, that point is now mute now that I have Panther. SO now I have to figure out Postfix?!

Anyway, before I spend the precious little time I have trying to figure that out. Can some one please tell me if it will work with PHP -- and I mean by just using the standard mail().

I want to be able to test my mail scripts before post them to my host. They are using Sendmail-- so if i have to add anything to my code to get Postfix to work -- then it's worthless.

Anyone had a chance to work on this issue yet?
LunaC is offline   Reply With Quote
Old 11-18-2003, 11:32 PM   #2
BraindeadMac
Triple-A Player
 
Join Date: Jan 2002
Location: Little Rock
Posts: 147
Re: Panther PHP & Sending Mail

Quote:
Originally posted by LunaC
Ok. I soooooo don't get how to set up sendmail on my computer. Of course, that point is now mute now that I have Panther. SO now I have to figure out Postfix?!

Anyway, before I spend the precious little time I have trying to figure that out. Can some one please tell me if it will work with PHP -- and I mean by just using the standard mail().

I want to be able to test my mail scripts before post them to my host. They are using Sendmail-- so if i have to add anything to my code to get Postfix to work -- then it's worthless.

Anyone had a chance to work on this issue yet?

Could you be a little more specific about what you are tyring to do? I'm not sure what you are wanting to do with PHP in particular; but I can tell you that I have Squirrelmail up and running on Panther Client with Postfix, for example.
BraindeadMac is offline   Reply With Quote
Old 11-18-2003, 11:39 PM   #3
LunaC
Prospect
 
Join Date: Nov 2003
Posts: 6
Ok, you know the mail(). I want to be able to use it in my scripts. Most web host have Sendmail configured so that PHP will send through Sendmail.

Now that we don't have Sendmail (since Apple taketh away). Does PostNix work the same way, so that if I configure it to send mail my mail() will work?
LunaC is offline   Reply With Quote
Old 11-19-2003, 05:13 AM   #4
JayBee
Major Leaguer
 
Join Date: Jan 2002
Location: Edinburgh, Scotland
Posts: 437
Postfix (and most sendmail replacements) is designed to replace sendmail in all the right places so that your system doesn't notice. In other words, your system doesn't care which MTA you're using - it just hooks into it and uses it to send mail, and each MTA is designed to do this in the same way.

This "playing nice" mentality extends to PHP too. There's no MTA-specific stuff (aside from some dodgy syntax changes if you're running on a Windows server... shudder!) to do in PHP. You just call the mail(address, subject, content, headers) function and let the system worry about WHAT MTA it's using. PHP doesn't care.

The ONLY caveat to this is if you're doing anything crazy with headers. Most will work fine, but test your script on both development and production server just to make sure. If one's broken, double check the line returns between each header. Chances are, this won't bite at all and you'll be absolutely fine.

If you do get stuck, check out PHP's excellent online manual entry for mail(). There is a more in depth article on that site about the mail functions in general.

And just as a testimony, I followed these instructions (don't forget to read the comments first!) about ten minutes after the dev tools had finished installing, and mail() was working in PHP about ten minutes after that. It really is that simple

And I'm in NO WAY an expert on this stuff
__________________
JayBee
--

It's all relative, you know
JayBee is offline   Reply With Quote
Old 11-20-2003, 08:16 AM   #5
LunaC
Prospect
 
Join Date: Nov 2003
Posts: 6
Can I say... I LOVE PANTHER!

And can I say even louder I LOVE POSTFIX ENABLER !!! Thank you Bernard Teo!

Postfix Enabler got my Postfix up and running with a click of a button... that's less than 30secs from starting the app to having a Postfix mail server.

And your right, JayBee, my PHP sent mail without any extra configuration on my part. All I had to do was one my script and Wala, I was getting mail. I couldn't even get SendMail to do that on Jaguar!

Thanks for all the help.

And Check out Postfix Enabler -- It's definately worth it!
LunaC is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:34 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.