php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26289 Random problem in mail() function
Submitted: 2003-11-17 11:10 UTC Modified: 2003-11-18 12:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: julien at touslesdrivers dot com Assigned:
Status: Not a bug Package: *Mail Related
PHP Version: 4.3.4 OS: Windows 2000 Server SP4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: julien at touslesdrivers dot com
New email:
PHP Version: OS:

 

 [2003-11-17 11:10 UTC] julien at touslesdrivers dot com
Description:
------------
Hello,

I have a problem with the mail() function. The OS is Windows 2000 Server SP4 + IIS 5.0 + MySQL + PHP 4.3.4 (ISAPI).

On my website, there is a form to subscribe to the site as a member. To confirm the subscription, I send a mail to the person who has to click on a link to confirm the subscription.

I use so the mail() function to send the mail as text format but there is a random problem.

Sometimes (about 2-3 times per week) persons who receive the mail can't confirm their subscription and forward the mail to me and I can then constat the problem:

A little part of the body (the string "script") had been replaced by another string ("VOID").

This problem is not dependant with the Mail client (Outlook, Netscape etc.).

PHP 4.3.4 doesn't resolves this problem.

I am not arrived to reproduce this problem and it it seems to be totally random. It is a very strange bug!! An idea?

Reproduce code:
---------------
The code source is:

$message = "
Bonjour,

Pour valider d?finitivement votre inscription comme membre, merci de clicker sur le lien ci-dessous:
http://www.domain.com/inscription.php?code=$code
";

mail($email,"Inscription",$message,"From: mail@domain.com\r\nContent-Type: text/plain; charset=iso-8859-1");

Expected result:
----------------
Normally the person would see:

Bonjour,

Pour valider d?finitivement votre inscription comme membre, merci de clicker sur le lien ci-dessous:
http://www.domain.com/inscription.php?code=1587

Actual result:
--------------
But some persons obtain:

Bonjour,

Pour valider d?finitivement votre inscription comme membre, merci de clicker sur le lien ci-dessous:
http://www.domain.com/inVOIDion.php?code=1587

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-17 14:16 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

I suspect the $code is not set or not set correctly.

First of all, change http://www.domain.com/inscription.php?code=$code
to
http://www.domain.com/inscription.php?code={$code}
and always validate value of $code before using it.
 [2003-11-17 14:45 UTC] julien at touslesdrivers dot com
Thanks you fo your reply.

I don't think the problem is the $code beacause this variable is set and is set correctly. Otherwise the value of $code would not appear in the URL...

I just want to know where this "VOID" come from?! And why it replaces the string "script" in the file name?

Thanks
 [2003-11-18 06:59 UTC] julien at touslesdrivers dot com
up
 [2003-11-18 12:34 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


 [2003-11-18 12:35 UTC] iliaa@php.net
This is not a PHP bug, somewhere along the line $code is not populated correctly, hence the error you are seeing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC