careful, you can't do that. I've tried, it was a clear no (and it was also clear to me upfront that it would be a no; I tried cause I had to but I knew better).
Why would the money need to be from overseas? Why would people who have/had jobs in Thailand not have the right to stay in Thailand on the basis of a marriage?
I agree this is the outcome. All I said is that it's not as straightforward as it was initially put, as if Thailand doesn't have any interference with such transactions in the first place. My point is that the Thai jurisdiction is applicable, if the person in question is a Thai resident for tax purposes. If some DTA or the jurisdiction itself then waives the tax, on whatever ground, then that's the outcome of the story. It's not a triviality per se.
Thailand's unimaginably stupid tax principle that only remittances are taxed, is what makes your transaction tax free (if you live in Thailand and if the applicable DTA appoints Thailand for this particular type of transaction). This doesn't take away that the transaction, if the DTA appoints Thailand, is subject to Thailand's tax laws. So the way you just put it, that Thailand has nothing to do or nothing to interfere about a transaction only because it was effected elsewhere, is untrue.
In countries without the said unimaginably stupid remittance principle (a group that Thailand is also joining by the way), you just owe tax over the profits (subject to DTA).