Jump to content

configuring php.ini to enable php mail


christite214

Recommended Posts

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!!!!!!!
Link to comment
Share on other sites

[!--quoteo(post=365912:date=Apr 18 2006, 03:43 AM:name=christite)--][div class=\'quotetop\']QUOTE(christite @ Apr 18 2006, 03:43 AM) [snapback]365912[/snapback][/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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.