@AliJames ****
You can get that anywhere really. All of the Thai embassies in nearby countries offer it. But you should look at their websites to see how long the e-visa processing time is. For example in Cambodia it's 15 working days, so you would need to spend a few weeks there.
The last embassies that still offer in-person services with an appointment are going to be in Laos (Vientiene and Savannakhet) and Yangon in Myanmar. It's already been confirmed that both of the Laos embassies are switching to e-visa at the end of this year so time is running out.
By the way they all require proof of funds. So if you can meet that requirement, why not just convert to the non-O marriage visa inside of Thailand?