How long are these in the direction of the extrusion, into the page of your sketch? If they are a few inches or more, you could use a piece of angle for the side rails with one flat against the side of the box and one parallel to the bottom below the parting line for the board to attach to. If you want to thread directly into the material make it 1/8" thick or so; you can get 1/8" thick x 1/2" x 1" angle and mount the 1" side against the box side. Then use a piece of flat bar an inch long, say 1/8" thick (or thicker) x 3/8" tall x 1" long. Drill and tap two holes 1/2" apart, with matching holes through the lower box, and clearance non-tapped holes through the angle. Use these to sandwich the angle against the box bottom at each end, and drill and tap a hole in the end to attach the box end plate. No custom extrusion needed, just off the shelf shapes and lighter than a big piece of flat bar like your first version, but you do have four extra pieces per box so the assembly labor goes up. A win if the boxes are long, not so much if the boxes are only a couple of inches long or less.