php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7767 mail function works with php3 but not php4
Submitted: 2000-11-12 04:17 UTC Modified: 2000-11-22 06:51 UTC
From: alexsun123 at hotmail dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.3pl1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexsun123 at hotmail dot com
New email:
PHP Version: OS:

 

 [2000-11-12 04:17 UTC] alexsun123 at hotmail dot com
The mail function worked with php3 but when i upgraded to php4, it no longer worked. I did not change the php.ini at all. Regardless, the sendpath is /usr/sbin/sendmail -t -i. 
i also tried just /usr/sbin/sendmail -t but that didn't work either. The mail function returns 1 but does not send the e-mail. the mail function I use to test is:
mail("alexsun123@hotmail.com", "Subject", "Line", "")
everything else works fine.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-12 10:56 UTC] sniper@php.net
What does this print out:

# ls -l /usr/sbin/sendmail

This is my output:
-rwsr-sr-x    1 root     root       320516 Nov 12 17:50 /usr/sbin/sendmail

and mail() works for me..

--Jani

 [2000-11-14 15:33 UTC] alexsun123 at hotmail dot com
I have those permissions set up and it doesn't work. I think it may be the version of sendmail. I know my sendmail hasn't been updated since february 2000 and the newest version was created in september 2000. what version are you running and have you tried it with older versions?
 [2000-11-21 16:09 UTC] alexsun123 at hotmail dot com
1. No error logs (I think because the function returns true).

2. the name is php.ini. I'm sure its being read by PHP on startup because I have made modifications to it and when i check phpinfo(), I see the modifications.

Well, when i was checking the 3rd, I found out that mail actually works now. I made some changes last week: i recompiled php3 and did make clean on php4 (well, i did make clean in the php4.0.3pl1 directory, but i'm not exactly sure what that entails) and for some reason mail is working now as far as i can tell.

In response to:

1. Are there any log entries in either apache error_log of or
   /var/log/messages about sendmail ?

2. What is the name of the php ini file you use? Are you sure it is read
   by PHP on startup?

3. Does sending mail to root@localhost work with mail() ?

 [2000-11-22 06:51 UTC] sniper@php.net
mail() works -> no bug -> Closed.


--Jani
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 14:01:30 2021 UTC