Heat the oil in a small pan and fry the onion and pepper over a medium heat for 1-2 minutes until soft. Remove from the heat and stir in the ham. Season to taste. Set aside.
Brush the sandwich toaster with a little sunflower oil, wiping off the excess with kitchen paper. Preheat the sandwich toaster to its highest setting.
Beat the egg and pour into a shallow dish. Butter one side of the bread slices.
Place one slice of bread (buttered side up) into the egg for a couple of minutes and then carefully remove it and place into the sandwich toaster (buttered side down). Carefully press the bread into the recesses with the back of a spoon, taking care not to tear the bread, or the filling will leak out. Spoon the ham mixture into the recesses and spread it out evenly. Soak the remaining slice of bread in the egg (buttered side up), mopping up as much egg as you can and then place this on top of the sandwich (buttered side up). Carefully close the lid and cook for 4 minutes until crisp and golden.