Influence of UV radiation from a massive YSO on the chemistry of its envelope