I want to apologize for some mistake in official mail and want to make them sure I will not do that again.
"I will take care of this next time" .
"I will take care of this onwards".
Suitable for many situations where you realize you have made an awful blunder.
This could be said to a family member or a friend when you need to express contrition. You can forgo the second sentence.
Terse and very formal, perhaps more appropriate in a business environment.