php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #347 Forth string argument of mail function
Submitted: 1998-05-05 08:24 UTC Modified: 1998-05-22 19:00 UTC
From: cllovera at grupo dot intercom dot es Assigned: shane (profile)
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Release Candidate 4 OS: WIN NT 4
Private report: No CVE-ID: None
 [1998-05-05 08:24 UTC] cllovera at grupo dot intercom dot es
I'm trying to change the headers:
<?
$email_milar="carles@defcon9.intercom.es";
$msg="Identificaci?n:";
$opcions.="Return-Path: carles@defcon9.intercom.es\n";
$opcions.="X-Sender: WIN 32\n";
$opcions.="X-Mailer: PHP3.0RC4\n";
mail($email_milar,"El Sabio Milar",$msg,$opcions);
?>

Problems:
- no mail is sent
- php3 crashes
- if mail is sent, headers are not well built


php2.ini file
[mail function]
SMTP=proxy.intercom.es                  ;for win32 only
sendmail_from= nobody@proxy.intercom.es  ;for win32 only
sendmail_path=                  ;for unix only

example of sent mail but not well built:
script:
<?
$email_milar="carles@defcon9.intercom.es";
$msg="Identificaci?n:";
$opcions="X-Mailer: PHP/FI".phpversion();
mail($email_milar,"El Sabio Milar",$msg,$opcions);
?>


result:
Return-Path: X-Mailer:PHP/FI3.0RC4@proxy.intercom.es
Received: from proxy.intercom.es (proxy.intercom.es [194.179.21.9]) by defcon9.i
ntercom.es (8.7.3/8.7.3) with ESMTP id OAA17778 for <carles@defcon9.intercom.es>
; Tue, 5 May 1998 14:26:49 -0100
From: X-Mailer:X-Mailer:PHP/FI3.0RC4@proxy.intercom.es
Received: from ntalberto (pc013.intercom.es [194.179.21.206]) by proxy.intercom.
es (8.7.3/8.6.9) with SMTP id OAA13264 for <carles@defcon9.intercom.es>; Tue, 5
May 1998 14:19:52 -0100
Message-Id: <199805051519.OAA13264@proxy.intercom.es>
X-Sender: X-Mailer: PHP/FI3.0RC4
X-Mailer: PHP/FI3.0RC4
Content-Type: text/plain; charset=us-ascii
Date: Tue, 05 May 1998 14:18:23 -0100
Subject: El Sabio Milar
To: carles@defcon9.intercom.es

PHP/FI3.0RC4 (null)
Identificaci?n:


my goal is to add a document to the mail (in mime) but
whats happening?

Thanks!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-22 19:00 UTC] shane
I've added error catching to catch not having a from header under win32.

Win32 requires either from be set in php3.ini or from be set in the header args of mail()

Looking into further issues


Mail() should function fine now.  Fixed a couple crashes.  One thing, if the From: header is included in the optional headers, it MUST be the first optional header.  All optional headers need to be seperated by newlines '\n'

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC