correct html structure in failure emails