This happened to me - I had to make an appt to apply for a passport in Bangkok - all done by email - easy efficient and they have photocopy scan and photo services there too - they notify you when it is ready for collection - they wouldn't send in the post but you can give written authorization for someone else to collect on your behalf - it left me with no visa to show for 6 weeks but no problem
I had to change the old ED visa to the new passport at immigration for a fee of 500thb