um hello guys, plz help me. i'm a total linux noob here. You see, i'm trying to create an open source web portal. I've just intalled ubuntu 6.06, Apache etc and the server is up and running now My question is, i need to send email via php mail() function but how? Hope you guys can help me
what to download? well, i need to know what to install in order for the php mail function to work. i'll use the mail function to SEND emails only.
Arnt' the PHP mail functions installed with php? I'd guess that you'd need to configure the php info file. But that seems like that'd be it.
Can you please create a .php file with the following content: Code: <?php phpinfo(); ?> And poste the output here?
Normally all you have to do is write a PHP script that uses the mail() function. Of course, PHP has to be installed in your web server.
Here's my phpinfo.html as requested sjau. Have to zip it coz it's too long to be posted here Falko, does this mean i can just use the mail function just like this? : <?php $to = "[email protected]"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "[email protected]"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> I tried this one but i didn't work. If there's a php path that i have to configure, please tell me One more thing, i read something about Sendmail..postfix..dovecot and all that, but i'm confused
Yes. If it doesn't work, please check your mail log (it's in /var/log) to find out why it didn't succeed. If you have a dynamic IP address, it's possible that Gmail/Yahoo/... classify your mails as spam.
sent as spams Hehe nevermind now. It seems that the emails that i sent using php mail() were sent as spams. So they won't show in the inbox but can be found in the spam folder instead. At least now i know that the php mail() works fine in my machine. Thanks everyone for replying