Jump to content


Photo

configuring php.ini to enable php mail


  • Please log in to reply
1 reply to this topic

#1 christite214

christite214
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 18 April 2006 - 07:43 AM

My settings in the php.ini are as follows:-

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

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

The code i am using to test the mail facility is this:-
<?php

if (@mail("modernite_19@rediffmail.com" ,"hi" , "hello")) {
echo('<p>Mail sent successfully.</p>');
} else {
echo('<p>Mail could not be sent.</p>');
}
?>

However i get this message mail could not be sent...... Wen i run the same code from a webhosting service i get mail sent message but i never receive the mail in my mailbox....i have put a valid mail
id.

Guys i need help desperately!!!!!!!

#2 JRS

JRS
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts

Posted 18 April 2006 - 10:04 PM

[!--quoteo(post=365912:date=Apr 18 2006, 03:43 AM:name=christite)--][div class=\'quotetop\']QUOTE(christite @ Apr 18 2006, 03:43 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
My settings in the php.ini are as follows:-

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

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


Guys i need help desperately!!!!!!!
[/quote]

Christite,

I'm not an expert on mail - but I believe you need to have mail server on your system. By default windows does not have one. So you need to make sure you have installed and configured a mail server on your system. Hopefully, one the guru types can offer more suggestions on what to look for.

Good luck
JRS




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users