It is made by reacting iodine , red phosphorus , and methanol all at the same time . Phosphorus ( III ) iodide is formed during the reaction .
Methyl iodide is formed via the exothermic reaction that occurs when iodine is added to a mixture of methanol with red phosphorus .