Saute the onion with a little olive oil in a medium frying pan over medium heat for 10 minutes until softened, but not coloured.
Add the garlic and cook for 2-3 minutes, stirring frequently to make sure it doesn’t burn.
Meanwhile, in a large pot with a lid, bring the wine to the boil.
Add the mussels, and cook for 3-4 minutes until all are open (one or two may stay closed, if they do, discard them).
Add the tomatoes to the garlic and onion.
Strain the mussel cooking liquid and add gradually to the tomato sauce.
Cover the mussels with tinfoil and keep warm.
Cook the tomato sauce over a medium-high heat in the frying pan until reduced and with a thick paste consistency(approximately 10-12 minutes).
Meanwhile, cook the spaghetti in boiling salted water.
Add the chilli, sugar, salt and pepper to the tomato sauce and adjust the seasonings to your taste.
Add the mussels for the last minute or two of cooking the sauce.
You can either remove them from their shells, or leave them in. I like to go 50/50.
Drain the pasta, but don’t dry it too thoroughly, and mix it with the mussels and sauce
Garnish with chopped parsley if using.