For the tomato sauce:Preheat oven to 325 degrees F.
In a large saucepan, heat oil over medium-low. Add onions and garlic, cooking and stirring until softened, about 5 minutes.
Add tomatoes, including juice, and salt. Cover and put in oven for 1 1/2 to 2 hours, stirring and mashing tomatoes with a fork occasionally, until sauce is thickened and reduced to about 3 cups. If sauce tastes too acidic, add sugar and cook 5 minutes more.
For the mussels:In a large, heavy pot (I used a 5.5 quart Le Creuset), heat oil over medium-low. Add garlic and red pepper flakes, cooking and stirring for 2 minutes. Increase heat to medium high. Add wine and bring to a boil. Add tomato sauce and mussels and cook over moderately high heat, covered, stirring occasionally, until mussels just open wide, 6 to 8 minutes. Discard any mussels that are unopened after 8 minutes. Serve immediately.