Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16932

Invalid email To: header on notifications to users with @ in name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.3.9-RC1
    • 3.3.5
    • Notification System
    • None

      After a recent upgrade to phpBB version 3.3.5, my cPanel-based provider began rejecting emails. Here is an excerpt from an account activation message for forum user "foo@bar" with email address xxx+foo@gmail.com:

      A message that you sent contained one or more recipient addresses that were
      incorrectly constructed:
       
        =?US-ASCII?Q?foo@bar?= <xxx+foo@gmail.com>: malformed address: ?= <xxx+foo@gmail.com> may not follow =?US-ASCII?Q?foo@bar
       
      This address has been ignored. There were no other addresses in your
      message, and so no attempt at delivery was possible.
      

      After applying the following hack, clearing cache, and forcing reactivation, the resulting email arrived without incident:

      *** functions_messenger.php.orig        Fri Dec 10 14:43:05 2021
      --- functions_messenger.php     Fri Dec 10 15:00:01 2021
      ***************
      *** 1855,1860 ****
      --- 1855,1861 ----
        {
              // Check if string contains ASCII only characters
              $is_ascii = strlen($str) === utf8_strlen($str);
      +       $is_ascii = false;
       
              // Define start delimimter, end delimiter and spacer
              // Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64
      

            Marc Marc
            merouleau merouleau [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: