PDA

View Full Version : mail with php


hamsa
Tue 23rd Dec '03, 12:36am
Hi all,

I have a problem with mail()..

first.. i don't know what exactly i must change in php.ini file to use mail function and i found alot of threads about smtp server to use php mail function but i don't know how i use it..i download it in my localhost machine, but what is the second step :confused: :confused: :confused: to send mail???????????????????????????

So please any body can help me to understand and solve this problem:( :(

Regards

TiLaser
Tue 23rd Dec '03, 8:19pm
Have you tried using PHP's built in mail() function?



$to = "stupid@stupid.com";
$subject = "you are stupid";
$message = "stupid you are";
$headers = "From: tilaserti@hotmail.com\r\n";

mail($to, $subject, $message, $headers);



You do not need any extensions for this, it is built into the core.