#40481 [NEW]: mail() sends email to wrong address where there are "-" in localpart of "to"

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40481 [NEW]: mail() sends email to wrong address where there are "-" in localpart of "to"

    From: penartur at yandex dot ru
    Operating system: Linux
    PHP version: 5.2.1
    PHP Bug Type: Mail related
    Bug description: mail() sends email to wrong address where there are "-" in localpart of "to"

    Description:
    ------------
    If localpart of "to" contains "-" characters, then they are truncated with
    all of the following characters before "@"

    Reproduce code:
    ---------------
    <?php
    mail('somename@mailserver.loc','msg1','msg1');
    mail('somename-abc@mailserver.loc','msg2','msg2');
    ?>

    Expected result:
    ----------------
    Message 'msg1' in 'somename' mailbox and message 'msg2' in 'somename-abc'
    mailbox

    Actual result:
    --------------
    Two messages ('msg1' and 'msg2') in 'somename' mailbox

    --
    Edit bug report at [url]http://bugs.php.net/?id=40481&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40481&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40481&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40481&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40481&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40481&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40481&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40481&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40481&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40481&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40481&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40481&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40481&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40481&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40481&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40481&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40481&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40481&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40481&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40481&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40481&r=mysqlcfg[/url]
    penartur at yandex dot ru Guest

  2. Similar Questions and Discussions

    1. #26218 [Fbk->Opn]: mail() sends extra "RCPT TO: <>" to smtp host
      ID: 26218 User updated by: bzheng at us dot nomura dot com Reported By: bzheng at us dot nomura dot com -Status: ...
    2. #26218 [Opn->Fbk]: mail() sends extra "RCPT TO: <>" to smtp host
      ID: 26218 Updated by: pollita@php.net Reported By: bzheng at us dot nomura dot com -Status: Open +Status: ...
    3. #26218 [NoF->Opn]: mail() sends extra "RCPT TO: <>" to smtp host
      ID: 26218 User updated by: bzheng at us dot nomura dot com Reported By: bzheng at us dot nomura dot com -Status: No...
    4. #26218 [Opn]: mail() sends extra "RCPT TO: <>" to smtp host
      ID: 26218 User updated by: bzheng at us dot nomura dot com Reported By: bzheng at us dot nomura dot com Status: Open...
    5. #26218 [NEW]: mail() sends extra "RCPT TO: <>" to smtp host
      From: bzheng at us dot nomura dot com Operating system: W2k server/IIS 5/PHP in CGI mode PHP version: 4.3.3 PHP Bug Type: ...
  3. #2

    Default #40481 [Opn->Fbk]: mail() sends email to wrong address where there are "-" in localpart of "to"

    ID: 40481
    Updated by: [email]tony2001@php.net[/email]
    Reported By: penartur at yandex dot ru
    -Status: Open
    +Status: Feedback
    Bug Type: Mail related
    Operating System: Linux
    PHP Version: 5.2.1
    New Comment:

    Cannot reproduce.
    (Created "test-user" and sent an email to its mailbox, which
    successfully arrived).
    Check your aliases and mail server.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-14 11:50:27] penartur at yandex dot ru

    Description:
    ------------
    If localpart of "to" contains "-" characters, then they are truncated
    with all of the following characters before "@"

    Reproduce code:
    ---------------
    <?php
    mail('somename@mailserver.loc','msg1','msg1');
    mail('somename-abc@mailserver.loc','msg2','msg2');
    ?>

    Expected result:
    ----------------
    Message 'msg1' in 'somename' mailbox and message 'msg2' in
    'somename-abc' mailbox

    Actual result:
    --------------
    Two messages ('msg1' and 'msg2') in 'somename' mailbox


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40481&edit=1[/url]
    tony2001@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139