Catalyzes the N-methylation of tryptamine and structurally related compounds (By similarity). Functions as thioether S-methyltransferase and is active with a variety of thioethers and the corresponding selenium and tellurium compounds, including 3-methylthiopropionaldehyde, dimethyl selenide, dimethyl telluride, 2-methylthioethylamine, 2-methylthioethanol, methyl-n-propyl sulfide and diethyl sulfide. Plays an important role in the detoxification of selenium compounds (By similarity). a tertiary amine + S-adenosyl-L-methionine = a methylated tertiary amine + H(+) + S-adenosyl-L-homocysteine a secondary amine + S-adenosyl-L-methionine = a methylated secondary amine + H(+) + S-adenosyl-L-homocysteine a primary amine + S-adenosyl-L-methionine = a methylated primary amine + H(+) + S-adenosyl-L-homocysteine dimethyl sulfide + S-adenosyl-L-methionine = S-adenosyl-L-homocysteine + trimethylsulfonium Monomer. Belongs to the class I-like SAM-binding methyltransferase superfamily. NNMT/PNMT/TEMT family.