-
Mail function @PHP
i am very beginner of PHP. i am trying to use mail function with differnt type of web server, the code is bellow
<?php
$to = "[email protected]";
$from = "[email protected]";
$subject = "This is a test email";
$message = "Dear John,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Jane.";
$headers = "From: $from\r\n";
$success = mail($to, $subject, $message, $headers);
if ($success)
echo "The email to $to from $from was successfully sent";
else
echo "An error occurred when sending the email to $to from $from";
?>
i know this is correct code, but it didnto work with many web server . at last its works at bizhat web server.
now my question is : is there any server configeration needed to use this mail function ??
like send mail path or localhost path,
pls help me to find out this problem
-
the only things you would need, would be some mail server, and a good version of PHP. Somtimes windows servers have different PHP syntax to fallow.
-
I can't answer your question, but maybe :
http://www.php.net/manual/en/function.mail.php
can be of some help.
good luck
-
Hian My mail function is too not working , please admin start a thread for Mail function tooo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks