#29276 [Com]: Cannot properly send mail via SMTP from PHP 5, but can from previous versions
| From: | mpurdy at vicnet dot net dot au | Date: | Fri, 30 Jul 2004 10:55:43 +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-63809@lists.php.net to get a copy of this message | ||
ID: 29276
Comment by: mpurdy at vicnet dot net dot au
Reported By: Austin519 at aol dot com
Status: Open
Bug Type: Mail related
Operating System: Windows XP SP1
PHP Version: 5.0.0
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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