Supposing the whole circuit works without smoke, what you have there is an optocoupler which will be turned on/off 50 times per second. This makes the transistor act the same. Which means that the cap will be charged according to the time constant, but discharged by the transistor. So there will be some voltage, but if you use a comparator afterwards, it should work.
However, the resistor will dissipate some 1.75 W (miscalculated in the comments), which means it will need a rating of at least 2 W (3 more likely). It might be best to listen to Bimpelrekkie's suggestion.
Here's a quick simulation in LTspice:
So if you want a relay afterwards, you could use it, since the voltage across the cap, even if not zero, will be, most probably, below the threshold. But be careful, even that little voltage as it is will still be considered a load by its inductance. Only don't connect the relay straight on the optocoupler's transistor, instead of the 10k resistor, because you'll have an LC tank there.