 Occasionally , in females where ulceration is correlated to the menstrual cycle or to an oral contraceptive , progestogen or a change in oral contraceptive may be beneficial . Use of nicotine replacement therapy for people who have developed oral ulceration after stopping smoking has also been reported . Starting smoking again does not usually lessen the condition . Trauma can be reduced by avoiding rough or sharp foodstuffs and by brushing teeth with care . If sodium lauryl sulfate is suspected to be the cause , avoidance of products containing this chemical may be useful and prevent recurrence in some individuals . Similarly patch testing may indicate that food allergy is responsible , and the diet modified accordingly . If investigations reveal deficiency states , correction of the deficiency may result in resolution of the ulceration . For example , there is some evidence that vitamin B12 supplementation may prevent recurrence in some individuals . 
