#29276 [Com]: Cannot properly send mail via SMTP from PHP 5, but can from previous versions
| From: | pipo dot de dot clown at circus dot horlepiep dot com | Date: | Fri, 27 Aug 2004 06:20:04 +0000 |
| Subject: | #29276 [Com]: Cannot properly send mail via SMTP from PHP 5, but can from previous versions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65320@lists.php.net to get a copy of this message | ||
ID: 29276
Comment by: pipo dot de dot clown at circus dot horlepiep dot com
Reported By: Austin519 at aol dot com
Status: Bogus
Bug Type: Mail related
Operating System: Windows XP SP1
PHP Version: 5.0.0
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2004-08-05 23:19:18] 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-07-30 12:55:41] 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-07-20 11:57:08] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29276&edit=1