php mail function

cfleck

tired
i'm trying to use the php mail() function in my web page, but it doesn't seem to work.

i'm using it as,

PHP:
if( mail( "email@email.com", "my subject", "my message") ){
  echo "mail sent";
}
else{ echo "mail not sent"; }

i always get the mail sent message, but no mail gets sent. is there something i have to set up special to send email?
 
There is probably a way to do it, because when you setup php for Windows, it asks for an SMTP server address, because windows doesn't have it's own MTA (mail transport agent)
 
Yes you can, but you have to specify it in php.ini, and on OS X that's a bit tricky since there is no php.ini file installed by default ;)
 
Back
Top