Forum Moderators: coopster

Message Too Old, No Replies

what are the settings for the mail() in php.ini

         

ravii

11:36 am on Dec 6, 2008 (gmt 0)

10+ Year Member



hello,

can anyone tell
what are the setting to do in php.ini to work the mail()

im just trying to send mail by using a very simple php function mail() ,but it is giving me the successfully delivered Msg but there is no mail in my inbox

here is the sample code

<?php
$to = "abc@hotmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

if ($to){
mail($to, $subject, $body);
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>

in php.ini these are my settings for the mail()

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = me@example.com

do i need to change anything else

thanks in advance

Anyango

1:57 pm on Dec 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is your SMTP (mail) Server running on localhost ?

[edited by: Anyango at 1:57 pm (utc) on Dec. 6, 2008]