I have written a letter to someone but at the begining of the letter I addressed someone else.

I mean I sent a letter to Dr. Smith but at the begining of my letter I have written Dear Dr. Jones and actually Dr. Jones is not in a good relationship with Dr. Smith.

I want to apologize for that but I don't know what to say. I can think of

I am sorry for writing another name . that was my maladroitness to make such a mistake. I hope you don't find it offensive.

Is maladroitness the right word in the above sentense?

I would be grateful if anyone could tell me better form of expressing my apology.

Thanks a million
I would not use the word "maladroitness," though it does say what you mean. The word "blunder" would be more natural and sincere sounding.

Dear Dr. Smith,

Please accept my apology for having sent you the email I intended for Dr. Jones. I fell victim to carelessness and one of the downsides of technology. We have to be super careful because it is easy to select the wrong recipient, and sometimes, even when we select the right one, another pops up without our noticing it. At the end of it all, I should have paid better attention. I hope my blunder did not offend you in any way. I would not do that for the world.
Again, I am so sorry that that happened. I meant no disrespect. Thank you
I am really grateful for your response.

That was perfect.

BTW, I didn't get the meaning of " I would not do that for the world"

Thank you