It's best to send a thank you letter while you're still fresh in the interviewer's mind. So you should send the email message within 24 hours of the interview (the same day as the interview or the next).
Are email thank you notes appropriate after a job interview?
Yes, you need to send a thank-you note after a job interview. ... "HR managers and the interview team do actually read them and it shows that a candidate is truly invested in the role and interested in working for the company."
Do interviewers respond to thank you notes?
The simple answer is yes. Even if the interview did not go as planned, sending thank you emails are a quick way to build potential contacts in the long term.