We have developed a novel basic technology for terahertz imaging; which allows detection and identification of drugs concealed in envelopes, by introducing the component spatial pattern analysis. The spatial distributions of the targets are obtained from terahertz multispectral transillumination images, using absorption spectra measured with a tunable terahertz-wave source. The samples we used were methamphetamine and MDMA, two of the most widely consumed illegal drugs in Japan, and aspirin as a reference. The three kinds of samples hidden in mail envelopes were clearly distinguished. Hereby we expect this technology to contribute to the screening letters and packages.