The Rest Stop - Cube Cart™ Free Modifications - Plus Addressing

Cube Cart™ eCommerce Modified

[Description and History] [Modification Instructions]

Allow plus-addressing in registered user eMail addresses

What is Plus Addressing

Plus Addressing has been around for many years, but it has only been publicized recently. It is a method of modifying the local part of an internet eMail address (as defined in RFC #822) to allow for filtering or categorizing incoming mail. Not all internet mail servers or clients permit the use of plus addressing, but most Unix or Linux based servers do. GMail from google is one well-known service that supports plus addressing.

Plus Addressing is used by adding a plus sign (+) followed by one or more additional legal characters between the last letter of your username and the at-sign (@) which comes before the domain name. For example, myname@example.com might use myname+expo@example.com or myname+ccorg@example.com. Then using mail filters all email with the tag '+expo' can be put into a separate mail folder for trade shows and email with the tag '+ccorg' could be put into a folder for mail from cubecart.org postings.

Depending on your point of view, web sites which do not allow plus addressing are either non-compliant with RFC822 and broken or just a little behind on keeping up with the world. Cube Cart™, out of the box does not allow plus addressing as of 3.0.14. However you may notice that the forums at cubecart.com and cubecart.org do allow it. This is not a matter of right versus wrong, rather than one of convenience.

Don't take my word for it. Here are some references culled from a search of the internet for 'RFC822' and 'plus addressing'.

The Modification

You can download a .zip file containing the modified RFC822.php and my instructions for performing this modification here, or you can follow the instructions that follow. I suggest pulling down the zip file anyway, for your records, and just in case the web munges any of the special characters used in the regular expression. I did special case the ampersand (&) but browsers and web servers aside, I may have missed something.

+-----------------------------------------------------------+
+ DISCLAIMER:                                               +
+ The modification is provided on an "AS IS" basis, without +
+ warranty of any kind, including without limitation the    +
+ warranties of merchantability, fitness for a particular   +
+ purpose and non-infringement. The entire risk as to the   +
+ quality and performance of the Software is borne by you.  +
+ Should the modification prove defective, you and not the  +
+ author assume the entire cost of any service and repair.  +
+-----------------------------------------------------------+

======================================
###  Installation -- Begin!        ###
======================================


Installation:
	Changed modules:
		classes/RFC822.php


======================================
+  classes/RFC822.php -- Begin
======================================

+-------------------------------------
+   Find: ar or around line 866
+-------------------------------------

		$regex = $strict ? '/^([.0-9a-z_-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';

+-------------------------------------
+   Replace with:
+-------------------------------------

		$regex = $strict ? '/^([+.0-9a-z_-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';

======================================
+  classes/RFC822.php -- Done!
======================================

Note: The change is here ^^^ immediately after the first '[' in
		the regular expression above.  Simply add a "+" at the front of
		the list of characters. All characters between the '[' and ']'
		are allowed in an email username according to RFC822 and later
		revisions of the specifications.

		Many MTA (mail transport agents) will pass a message sent to
		'my+cart@example.com' on to 'my@example.com' which allows this
		user to place the tag '+cart' on the email address for purposes
		of tracking and processing email. It also enables the user to
		know by whom and where a message originates.

======================================
###  Installation -- Done!         ###
======================================

[RestStop] [Information] [Cube Cart Info]

Please visit our stores
(Golden State Gift Baskets - Custom made gift baskets)
(Golden State Gifts [not yet open] - Custom Gifts)


Copyright © 1995-2007, Catalyst Industries
Last modified on March 6, 2007