It is not illegal.
What may be the case, is that the flue gasses may be causing a nuisance (literally a Statutory Nuisance under the Environmental Protection Act 1990) and if so, then it may require you to move the flue to abate the nuisance.
Its not just a case of the flue gases going over the boundary, but they must be affecting the neighbours use of the property for it to be a nuisance.
Your neighbour will have to complain to the local council, who may investigate. If they do, get some advice and don't agree any claims unless there is an obvious and significant problem with the flue gas
The other option is that the gases commit a trespass. In this case the neighbour would have to sue in the county court and prove that the gases are causing damage. Harder to do and costly for them
You could probably turn the flue upwards to allow the gasses to exit and disperse higher up, if they are a problem in the current arrangement.
Either way, your home insurance would probably cover you