php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29276 Cannot properly send mail via SMTP from PHP 5, but can from previous versions
Submitted: 2004-07-20 11:57 UTC Modified: 2004-08-05 23:19 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Austin519 at aol dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.0.0 OS: Windows XP SP1
Private report: No CVE-ID: None
 [2004-07-20 11:57 UTC] Austin519 at aol dot com
Description:
------------
I am currently running PHP5 with Apache 2.0.49 and an open-source shopping cart solution OsCommerce (www.oscommerce.com).  The OsCommerce email function is a standard one (I won't paste here) that sends standard or MIME emails depending on what you choose for it to send.  Running PHP 4.3.1 I had no issues sending email, however after successfully upgrading to PHP5, I now receive an error.

As I said, the email function is nothing deviating from most of the general working functions posted on the web.  My php.ini lines that it would be referring to are below (edited out my domain name):

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

; For Win32 only.
sendmail_from = myemail@mydomain.com

Reproduce code:
---------------
The specific line the error below refers to is here:
return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));

The entire email function is here:
http://www.modsp.com/email.php.txt

Expected result:
----------------
Emails are processed and sent to recipients.

Actual result:
--------------
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in \path_to_storefront\email.php on line 500

(edited out full path to storefront)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-30 12:55 UTC] mpurdy at vicnet dot net dot au
I have the same problem under Windows 2000 professional.  If I use php-win.exe I can send an email without any problems.  However php-cgi.exe and php.exe produce and error which is 

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in e:\http\mail.php
 on line 4
 [2004-08-05 23:19 UTC] edink@php.net
http://snaps.php.net/win32/php5.0-win32-latest.zip works fine for me. Make sure corrent php.ini files is read by looking at phpinfo() output.
 [2004-08-27 08:19 UTC] pipo dot de dot clown at circus dot horlepiep dot com
I had the same problem. It seamed that php.ini is not read.
If I put php.ini in the c:\windows directory all was fine.

It seems that SetEnv PHPRC in httpd.conf has no effect.
(search for "SetEnv PHRC" on a search engine).
http://www.manucorp.com/archives/php-bugs/200408/msg00794.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 10 01:01:26 2024 UTC