php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23251 Problem with mail FUNCTION
Submitted: 2003-04-16 22:48 UTC Modified: 2003-04-23 00:14 UTC
From: cmrkind at yahoo dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.0.1 OS: WINDOWS 98
Private report: No CVE-ID: None
 [2003-04-16 22:48 UTC] cmrkind at yahoo dot com
Hello,

        I am working php 4.0.1 in apache server,win32 

environment.In php.ini configuration

[mail function]
SMTP=localhost                               ;for win32 only
sendmail_from=me@localhost.com               ;for win32 only
;sendmail_path=;for unix only,may supply arguments as well       

        I have met a problem when i am going to execute 

mail() function.



<?
           $mail_to="cmrkind@yahoo.com";
           $mail_sub="Testing";
           $mail_body="This is a test";   
   
           if(mail($mail_to,$mail_sub,$mail_body))
           {
                echo "Successfully sent";
           }
           else
           {
                echo "Sorry,Could not sent"  ;
           }

   ?>

In the above program should give the result "Successfully sent"
But it gives

Warning: Failed to Receive in c:\apache\htdocs\mensanswers\ramesh\mailtest.php on line 6
Sorry,Could not sent 
     
        So, Please any one know about the problem  then 

help me to solve.

Thanking you,
                                       Truely ,
                                     Ramesh.c.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-17 19:35 UTC] nicos@php.net
Hello,

First you NEED to upgrade to PHP-4.3.0 at least. Then you should really configure your settings in your php.ini. Are you sure you run an SMTPd on your localhost?
 [2003-04-23 00:14 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

and check your php.ini (make sure you update it too, it has changed since 4.0.1 a lot)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 19:01:31 2024 UTC