Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ultraloveninja

macrumors newbie
Original poster
Aug 14, 2008
2
0
Hello ya'll!

I am currently trying to get a php form to work using the PHP mail() function.
It's processing with no errors, but it is not sending any mail.

The form is hosted on an xserve with apache running on it.

my questions is that I am not very familiar with the workings of a xserve with the server admin app/tools. I am not too sure if I need to have SMTP enabled in the mail in order for it to send mail via the php mail function.

I have edited my php.ini file to go to the specific IP address of the mail server, and that doesn't seem to resolve anything either (our mail server is on a different server).

Postfix is on the server, but again I am not sure if server admin tools app is controlling that or not. Like I said, it's new to me.

Anyways, any help would be awesome.
If anyone needs any other info, please let me know.
Thanks!
 
Check out this recent thread, which covers the same kind of thing. It may have some helpful hints there. It very well could be a SMTP issue. Unfortunately the mail function does not return errors, whether the email was successful or not. If it's a SMTP thing you'll need to edit the php.ini in the SMTP section so that the server is something like mail.servername.com and port number 25.
 
Ah, yeah. I read that.

Well, it's weird. I turned off the actual mail service in the server app, and then set my php.ini file to point to the IP address of the mail server and it seems to be working ok.

but if continually test the form to myself, some get through and some don't.

i was looking at the logs and even though the mail service was turned off (or stopped) it was still passing mail through postfix.

meh.

i wish i knew how this damn server was configured before hand. i kinda fell into this situation with the server already setup, but i need to configure it so PHP will work on it. and part of it is i can't just remove anything that might be causing something else to work right cause that could cause problems as well.
i know that i could put exim on it. i've been able to get that running on linux(ubuntu). just not sure if it's conflicting with anything or if i the configuration on it is wacked out.

PS - ok. i was going through some stuff and i did a
locate sendmail | grep bin

and found this:
/usr/sbin/sendmail

then i did this:
locate postfix | grep bin

and it came back with this:
/usr/sbin/postfix

sorry. i am not too familiar with postfix/sendmail on mac with the server app. is there anyway to tell which is using what and what one i should use??? do i need to configure my php.ini file to use postfix instead of sendmail and if so what is the command for postfix (i.e. - php.ini default config for sendmail:/usr/sbin/sendmail -t -i)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.