If you hold stamps up so that light is reflected off them you can detect a narrow band on 2nd class, and a broad band on others. However AIUI if the sorting machinery, which uses this band of whatever it is to turn envelopes the right way up, detects one 2nd class stamp only it treats the item as 2nd class, but if it detects a broad band, or more than one stamp, it treats it as 1st class.
Peter